Skip to content

Commit eb81af5

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

27 files changed

+126
-57
lines changed

man/rmd/discrim_linear_MASS.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ discrim_linear() %>%
2727
```{r child = "template-zv.Rmd"}
2828
```
2929

30+
## Case weights
31+
32+
```{r child = "template-no-case-weights.Rmd"}
33+
```
34+
3035
## References
3136

3237
- Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer.

man/rmd/discrim_linear_MASS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ Variance calculations are used in these computations so _zero-variance_ predicto
3939

4040

4141

42+
## Case weights
43+
44+
45+
The underlying model implementation does not allow for case weights.
46+
4247
## References
4348

4449
- Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer.

man/rmd/discrim_linear_sda.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ discrim_linear() %>%
3737
```{r child = "template-zv.Rmd"}
3838
```
3939

40+
## Case weights
41+
42+
```{r child = "template-no-case-weights.Rmd"}
43+
```
44+
4045
## References
4146

4247
- Ahdesmaki, A., and K. Strimmer. 2010. Feature selection in omics prediction problems using cat scores and false non-discovery rate control. Ann. Appl. Stat. 4: 503-519. [Preprint](https://arxiv.org/abs/0903.2003).

man/rmd/discrim_linear_sda.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ Variance calculations are used in these computations so _zero-variance_ predicto
4949

5050

5151

52+
## Case weights
53+
54+
55+
The underlying model implementation does not allow for case weights.
56+
5257
## References
5358

5459
- Ahdesmaki, A., and K. Strimmer. 2010. Feature selection in omics prediction problems using cat scores and false non-discovery rate control. Ann. Appl. Stat. 4: 503-519. [Preprint](https://arxiv.org/abs/0903.2003).

man/rmd/discrim_linear_sparsediscrim.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ discrim_linear(regularization_method = character(0)) %>%
4949
```{r child = "template-zv.Rmd"}
5050
```
5151

52+
## Case weights
53+
54+
```{r child = "template-no-case-weights.Rmd"}
55+
```
56+
5257
## References
5358

5459

man/rmd/discrim_linear_sparsediscrim.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ Variance calculations are used in these computations so _zero-variance_ predicto
5454

5555

5656

57+
## Case weights
58+
59+
60+
The underlying model implementation does not allow for case weights.
61+
5762
## References
5863

5964

man/rmd/discrim_quad_MASS.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ discrim_quad() %>%
2727
```{r child = "template-zv-conditional.Rmd"}
2828
```
2929

30+
## Case weights
31+
32+
```{r child = "template-no-case-weights.Rmd"}
33+
```
34+
3035
## References
3136

3237
- Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer.

man/rmd/discrim_quad_MASS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ Variance calculations are used in these computations within each outcome class.
3939

4040

4141

42+
## Case weights
43+
44+
45+
The underlying model implementation does not allow for case weights.
46+
4247
## References
4348

4449
- Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer.

man/rmd/discrim_quad_sparsediscrim.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ discrim_quad(regularization_method = character(0)) %>%
4848
```{r child = "template-zv-conditional.Rmd"}
4949
```
5050

51+
## Case weights
52+
53+
```{r child = "template-no-case-weights.Rmd"}
54+
```
55+
5156
## References
5257

5358
- `qda_diag()`: Dudoit, Fridlyand and Speed (2002) Comparison of Discrimination Methods for the Classification of Tumors Using Gene Expression Data, _Journal of the American Statistical Association_, 97:457, 77-87.

man/rmd/discrim_quad_sparsediscrim.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ Variance calculations are used in these computations within each outcome class.
5353

5454

5555

56+
## Case weights
57+
58+
59+
The underlying model implementation does not allow for case weights.
60+
5661
## References
5762

5863
- `qda_diag()`: Dudoit, Fridlyand and Speed (2002) Comparison of Discrimination Methods for the Classification of Tumors Using Gene Expression Data, _Journal of the American Statistical Association_, 97:457, 77-87.

man/rmd/discrim_regularized_klaR.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ discrim_regularized(frac_identity = numeric(0), frac_common_cov = numeric(0)) %>
5151
```{r child = "template-zv-conditional.Rmd"}
5252
```
5353

54+
## Case weights
55+
56+
```{r child = "template-no-case-weights.Rmd"}
57+
```
58+
5459
## References
5560

5661
- Friedman, J (1989). Regularized Discriminant Analysis. _Journal of the American Statistical Association_, 84, 165-175.

man/rmd/discrim_regularized_klaR.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ Variance calculations are used in these computations within each outcome class.
5959

6060

6161

62+
## Case weights
63+
64+
65+
The underlying model implementation does not allow for case weights.
66+
6267
## References
6368

6469
- Friedman, J (1989). Regularized Discriminant Analysis. _Journal of the American Statistical Association_, 84, 165-175.

man/rmd/linear_reg_gls.Rmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,10 @@ lme_fit %>% tidy() %>%
119119
gls_fit %>% tidy()
120120
```
121121

122+
## Case weights
122123

124+
```{r child = "template-no-case-weights.Rmd"}
125+
```
123126

124127
## References
125128

man/rmd/linear_reg_gls.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,11 @@ gls_fit %>% tidy()
197197
## 2 week -2.12 0.224 -9.47 2.26e-18
198198
```
199199

200+
## Case weights
200201

201202

203+
The underlying model implementation does not allow for case weights.
204+
202205
## References
203206

204207
- J Pinheiro, and D Bates. 2000. _Mixed-effects models in S and S-PLUS_. Springer, New York, NY

man/rmd/logistic_reg_gee.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ fit(gee_wflow, data = toenail)
6969

7070
Also, because of issues with the `gee()` function, a supplementary call to `glm()` is needed to get the rank and QR decomposition objects so that `predict()` can be used.
7171

72+
## Case weights
73+
74+
```{r child = "template-no-case-weights.Rmd"}
75+
```
76+
7277
## References
7378

7479
- Liang, K.Y. and Zeger, S.L. (1986) Longitudinal data analysis using generalized linear models. _Biometrika_, 73 13–22.

man/rmd/logistic_reg_gee.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ The `gee::gee()` function always prints out warnings and output even when `silen
8080

8181
Also, because of issues with the `gee()` function, a supplementary call to `glm()` is needed to get the rank and QR decomposition objects so that `predict()` can be used.
8282

83+
## Case weights
84+
85+
86+
The underlying model implementation does not allow for case weights.
87+
8388
## References
8489

8590
- Liang, K.Y. and Zeger, S.L. (1986) Longitudinal data analysis using generalized linear models. _Biometrika_, 73 13–22.

man/rmd/multinom_reg_brulee.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ multinom_reg(penalty = double(1)) %>%
5050
```{r child = "template-same-scale.Rmd"}
5151
```
5252

53+
## Case weights
54+
55+
```{r child = "template-no-case-weights.Rmd"}
56+
```
57+
5358
## References
5459

5560
- Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer.

man/rmd/multinom_reg_brulee.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ Factor/categorical predictors need to be converted to numeric values (e.g., dumm
5656
Predictors should have the same scale. One way to achieve this is to center and
5757
scale each so that each predictor has mean zero and a variance of one.
5858

59+
## Case weights
60+
61+
62+
The underlying model implementation does not allow for case weights.
63+
5964
## References
6065

6166
- Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer.

man/rmd/multinom_reg_keras.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ multinom_reg(penalty = double(1)) %>%
4242
```{r child = "template-same-scale.Rmd"}
4343
```
4444

45+
## Case weights
46+
47+
```{r child = "template-no-case-weights.Rmd"}
48+
```
49+
4550
## Examples
4651

4752
The "Fitting and Predicting with parsnip" article contains [examples](https://parsnip.tidymodels.org/articles/articles/Examples.html#multinom-reg-keras) for `multinom_reg()` with the `"keras"` engine.

man/rmd/multinom_reg_keras.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ Factor/categorical predictors need to be converted to numeric values (e.g., dumm
4646
Predictors should have the same scale. One way to achieve this is to center and
4747
scale each so that each predictor has mean zero and a variance of one.
4848

49+
## Case weights
50+
51+
52+
The underlying model implementation does not allow for case weights.
53+
4954
## Examples
5055

5156
The "Fitting and Predicting with parsnip" article contains [examples](https://parsnip.tidymodels.org/articles/articles/Examples.html#multinom-reg-keras) for `multinom_reg()` with the `"keras"` engine.

man/rmd/naive_Bayes_naivebayes.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ For count data, integers can be estimated using a Poisson distribution if the ar
4444
```{r child = "template-zv.Rmd"}
4545
```
4646

47+
## Case weights
48+
49+
```{r child = "template-no-case-weights.Rmd"}
50+
```
51+
4752
## References
4853

4954
- Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer.

man/rmd/naive_Bayes_naivebayes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ Variance calculations are used in these computations so _zero-variance_ predicto
5252

5353

5454

55+
## Case weights
56+
57+
58+
The underlying model implementation does not allow for case weights.
59+
5560
## References
5661

5762
- Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer.

man/rmd/nearest-neighbor.Rmd

Lines changed: 0 additions & 49 deletions
This file was deleted.

man/rmd/pls_mixOmics.Rmd

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ This package is available via the Bioconductor repository and is not accessible
7171
remotes::install_bioc("mixOmics")
7272
```
7373

74-
75-
7674
## Preprocessing requirements
7775

7876
```{r child = "template-makes-dummies.Rmd"}
@@ -84,6 +82,11 @@ This package is available via the Bioconductor repository and is not accessible
8482
```{r child = "template-same-scale.Rmd"}
8583
```
8684

85+
## Case weights
86+
87+
```{r child = "template-no-case-weights.Rmd"}
88+
```
89+
8790
## References
8891

8992
- Rohart F and Gautier B and Singh A and Le Cao K-A (2017). "mixOmics: An R package for 'omics feature selection and multiple data integration." PLoS computational biology, 13(11), e1005752.

man/rmd/pls_mixOmics.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ This package is available via the Bioconductor repository and is not accessible
9292
remotes::install_bioc("mixOmics")
9393
```
9494

95-
96-
9795
## Preprocessing requirements
9896

9997

@@ -108,6 +106,11 @@ Variance calculations are used in these computations so _zero-variance_ predicto
108106
Predictors should have the same scale. One way to achieve this is to center and
109107
scale each so that each predictor has mean zero and a variance of one.
110108

109+
## Case weights
110+
111+
112+
The underlying model implementation does not allow for case weights.
113+
111114
## References
112115

113116
- Rohart F and Gautier B and Singh A and Le Cao K-A (2017). "mixOmics: An R package for 'omics feature selection and multiple data integration." PLoS computational biology, 13(11), e1005752.

man/rmd/poisson_reg_gee.Rmd

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,12 @@ poisson_reg(engine = "gee") %>%
2626

2727
There are no specific preprocessing needs. However, it is helpful to keep the clustering/subject identifier column as factor or character (instead of making them into dummy variables). See the examples in the next section.
2828

29-
## Other details
29+
## Case weights
30+
31+
```{r child = "template-no-case-weights.Rmd"}
32+
```
3033

31-
The model cannot accept case weights.
34+
## Other details
3235

3336
Both `gee:gee()` and `gee:geepack()` specify the id/cluster variable using an argument `id` that requires a vector. parsnip doesn't work that way so we enable this model to be fit using a artificial function `id_var()` to be used in the formula. So, in the original package, the call would look like:
3437

man/rmd/poisson_reg_gee.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,12 @@ poisson_reg(engine = "gee") %>%
3737

3838
There are no specific preprocessing needs. However, it is helpful to keep the clustering/subject identifier column as factor or character (instead of making them into dummy variables). See the examples in the next section.
3939

40-
## Other details
40+
## Case weights
41+
4142

42-
The model cannot accept case weights.
43+
The underlying model implementation does not allow for case weights.
44+
45+
## Other details
4346

4447
Both `gee:gee()` and `gee:geepack()` specify the id/cluster variable using an argument `id` that requires a vector. parsnip doesn't work that way so we enable this model to be fit using a artificial function `id_var()` to be used in the formula. So, in the original package, the call would look like:
4548

0 commit comments

Comments
 (0)