Skip to content

Commit 8a6f61c

Browse files
committed
added more notes in engine docs
1 parent ceb9c0b commit 8a6f61c

8 files changed

+46
-0
lines changed

man/rmd/bag_mars_earth.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ bag_mars(
5757
```{r child = "template-makes-dummies.Rmd"}
5858
```
5959

60+
## Case weights
61+
62+
```{r child = "template-uses-case-weights.Rmd"}
63+
```
64+
6065
## References
6166

6267
- Breiman, L. 1996. "Bagging predictors". Machine Learning. 24 (2): 123-140

man/rmd/bag_mars_earth.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ bag_mars(
8484

8585
Factor/categorical predictors need to be converted to numeric values (e.g., dummy or indicator variables) for this engine. When using the formula method via \\code{\\link[=fit.model_spec]{fit()}}, parsnip will convert factor columns to indicators.
8686

87+
## Case weights
88+
89+
90+
This model can utilize case weights during model fitting. To use them, see the documentation in [case_weights] and the examples on `tidymodels.org`.
91+
92+
The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights.
93+
8794
## References
8895

8996
- Breiman, L. 1996. "Bagging predictors". Machine Learning. 24 (2): 123-140

man/rmd/bag_tree_rpart.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ bag_tree(tree_depth = integer(1), min_n = integer(1), cost_complexity = double(1
7272
```{r child = "template-tree-split-factors.Rmd"}
7373
```
7474

75+
## Case weights
76+
77+
```{r child = "template-uses-case-weights.Rmd"}
78+
```
79+
7580
## References
7681

7782
- Breiman L. 1996. "Bagging predictors". Machine Learning. 24 (2): 123-140

man/rmd/bag_tree_rpart.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@ bag_tree(tree_depth = integer(1), min_n = integer(1), cost_complexity = double(1
116116

117117
This engine does not require any special encoding of the predictors. Categorical predictors can be partitioned into groups of factor levels (e.g. `{a, c}` vs `{b, d}`) when splitting at a node. Dummy variables are not required for this model.
118118

119+
## Case weights
120+
121+
122+
This model can utilize case weights during model fitting. To use them, see the documentation in [case_weights] and the examples on `tidymodels.org`.
123+
124+
The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights.
125+
119126
## References
120127

121128
- Breiman L. 1996. "Bagging predictors". Machine Learning. 24 (2): 123-140

man/rmd/discrim_flexible_earth.Rmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ discrim_flexible(
4444
```{r child = "template-makes-dummies.Rmd"}
4545
```
4646

47+
## Case weights
48+
49+
```{r child = "template-uses-case-weights.Rmd"}
50+
```
4751

4852
## References
4953

man/rmd/discrim_flexible_earth.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ discrim_flexible(
5353

5454
Factor/categorical predictors need to be converted to numeric values (e.g., dummy or indicator variables) for this engine. When using the formula method via \\code{\\link[=fit.model_spec]{fit()}}, parsnip will convert factor columns to indicators.
5555

56+
## Case weights
57+
58+
59+
This model can utilize case weights during model fitting. To use them, see the documentation in [case_weights] and the examples on `tidymodels.org`.
60+
61+
The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights.
5662

5763
## References
5864

man/rmd/discrim_linear_mda.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ discrim_linear(penalty = numeric(0)) %>%
4343
```{r child = "template-zv.Rmd"}
4444
```
4545

46+
## Case weights
47+
48+
```{r child = "template-uses-case-weights.Rmd"}
49+
```
50+
4651
## References
4752

4853
- Hastie, Tibshirani & Buja (1994) Flexible Discriminant Analysis by Optimal

man/rmd/discrim_linear_mda.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ Variance calculations are used in these computations so _zero-variance_ predicto
4848

4949

5050

51+
## Case weights
52+
53+
54+
This model can utilize case weights during model fitting. To use them, see the documentation in [case_weights] and the examples on `tidymodels.org`.
55+
56+
The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights.
57+
5158
## References
5259

5360
- Hastie, Tibshirani & Buja (1994) Flexible Discriminant Analysis by Optimal

0 commit comments

Comments
 (0)