You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The goal of parsnip is to provide a tidy, unified interface to models that can be used to try a range of models without getting bogged down in the syntactical minutiae of the underlying packages.
21
+
The goal of parsnip is to provide a tidy, unified interface to models
22
+
that can be used to try a range of models without getting bogged down in
23
+
the syntactical minutiae of the underlying packages.
20
24
21
25
## Installation
22
26
23
-
24
-
```r
27
+
```r
25
28
# The easiest way to get parsnip is to install all of tidymodels:
26
29
install.packages("tidymodels")
27
30
@@ -33,13 +36,14 @@ install.packages("parsnip")
33
36
devtools::install_github("tidymodels/parsnip")
34
37
```
35
38
36
-
37
39
## Getting started
38
40
39
-
One challenge with different modeling functions available in R _that do the same thing_ is that they can have different interfaces and arguments. For example, to fit a random forest _regression_ model, we might have:
41
+
One challenge with different modeling functions available in R *that do
42
+
the same thing* is that they can have different interfaces and
43
+
arguments. For example, to fit a random forest *regression* model, we
44
+
might have:
40
45
41
-
42
-
```r
46
+
```r
43
47
# From randomForest
44
48
rf_1<- randomForest(
45
49
y~.,
@@ -69,25 +73,32 @@ rf_3 <- ml_random_forest(
69
73
)
70
74
```
71
75
72
-
Note that the model syntax can be very different and that the argument names (and formats) are also different. This is a pain if you switch between implementations.
73
-
74
-
In this example:
76
+
Note that the model syntax can be very different and that the argument
77
+
names (and formats) are also different. This is a pain if you switch
78
+
between implementations.
75
79
76
-
* the **type** of model is "random forest",
77
-
* the **mode** of the model is "regression" (as opposed to classification, etc), and
78
-
* the computational **engine** is the name of the R package.
80
+
In this example:
79
81
82
+
- the **type** of model is “random forest”,
83
+
- the **mode** of the model is “regression” (as opposed to
84
+
classification, etc), and
85
+
- the computational **engine** is the name of the R package.
80
86
81
87
The goals of parsnip are to:
82
88
83
-
* Separate the definition of a model from its evaluation.
84
-
* Decouple the model specification from the implementation (whether the implementation is in R, spark, or something else). For example, the user would call `rand_forest` instead of `ranger::ranger` or other specific packages.
85
-
* Harmonize argument names (e.g. `n.trees`, `ntrees`, `trees`) so that users only need to remember a single name. This will help _across_ model types too so that `trees` will be the same argument across random forest as well as boosting or bagging.
89
+
- Separate the definition of a model from its evaluation.
90
+
- Decouple the model specification from the implementation (whether
91
+
the implementation is in R, spark, or something else). For example,
92
+
the user would call `rand_forest` instead of `ranger::ranger` or
93
+
other specific packages.
94
+
- Harmonize argument names (e.g. `n.trees`, `ntrees`, `trees`) so that
95
+
users only need to remember a single name. This will help *across*
96
+
model types too so that `trees` will be the same argument across
97
+
random forest as well as boosting or bagging.
86
98
87
99
Using the example above, the `parsnip` approach would be:
A list of all `parsnip` models across different CRAN packages can be
163
+
found at [`tidymodels.org`](https://www.tidymodels.org/find/).
152
164
165
+
Data sets previously found in `parsnip` are now find in the `modeldata`
166
+
package.
153
167
154
168
## Contributing
155
169
156
-
If you encounter a bug, please file a minimal reproducible example on [GitHub](https://github.com/tidymodels/parsnip/issues). For questions and other discussion, please use [community.rstudio.com](https://community.rstudio.com/).
170
+
If you encounter a bug, please file a minimal reproducible example on
171
+
[GitHub](https://github.com/tidymodels/parsnip/issues). For questions
Please note that the parsnip project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
175
+
Please note that the parsnip project is released with a [Contributor
0 commit comments