Skip to content

Commit eb0d94a

Browse files
hfricktopepo
andauthored
Engine docs for censored (#753)
* add details on time predictions for censored * udpated `.md` files for censored-related models/enginges * use templates * engine doc refresh * fix broken h2o links in docs Co-authored-by: Max Kuhn <[email protected]>
1 parent 8aa9d2d commit eb0d94a

25 files changed

+129
-44
lines changed

man/details_linear_reg_h2o.Rd

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/details_logistic_reg_h2o.Rd

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/details_multinom_reg_h2o.Rd

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/details_poisson_reg_h2o.Rd

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/rmd/bag_tree_rpart.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ bag_tree(tree_depth = integer(1), min_n = integer(1), cost_complexity = double(1
7777
```{r child = "template-uses-case-weights.Rmd"}
7878
```
7979

80+
## Other details
81+
82+
```{r child = "template-survival-median.Rmd"}
83+
```
84+
8085
## References
8186

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

man/rmd/bag_tree_rpart.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ This model can utilize case weights during model fitting. To use them, see the d
124124

125125
The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights.
126126

127+
## Other details
128+
129+
130+
131+
Predictions of type `"time"` are predictions of the median survival time.
132+
127133
## References
128134

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

man/rmd/boost_tree_mboost.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ boost_tree() %>%
4545
```{r child = "template-tree-split-factors.Rmd"}
4646
```
4747

48+
## Other details
49+
50+
```{r child = "template-survival-mean.Rmd"}
51+
```
52+
4853
## References
4954

5055
- Buehlmann P, Hothorn T. 2007. Boosting algorithms: regularization, prediction and model fitting. _Statistical Science_, 22(4), 477–505.

man/rmd/boost_tree_mboost.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ boost_tree() %>%
5252

5353
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.
5454

55+
## Other details
56+
57+
58+
59+
Predictions of type `"time"` are predictions of the mean survival time.
60+
5561
## References
5662

5763
- Buehlmann P, Hothorn T. 2007. Boosting algorithms: regularization, prediction and model fitting. _Statistical Science_, 22(4), 477–505.

man/rmd/decision_tree_partykit.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ decision_tree(tree_depth = integer(1), min_n = integer(1)) %>%
7878
```{r child = "template-tree-split-factors.Rmd"}
7979
```
8080

81+
## Other details
82+
83+
```{r child = "template-survival-median.Rmd"}
84+
```
85+
8186
## References
8287

8388
- [partykit: A Modular Toolkit for Recursive Partytioning in R](https://jmlr.org/papers/v16/hothorn15a.html)

man/rmd/decision_tree_partykit.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ decision_tree(tree_depth = integer(1), min_n = integer(1)) %>%
115115

116116
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.
117117

118+
## Other details
119+
120+
121+
122+
Predictions of type `"time"` are predictions of the median survival time.
123+
118124
## References
119125

120126
- [partykit: A Modular Toolkit for Recursive Partytioning in R](https://jmlr.org/papers/v16/hothorn15a.html)

man/rmd/decision_tree_rpart.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ decision_tree(
7070
```{r child = "template-uses-case-weights.Rmd"}
7171
```
7272

73+
## Other details
74+
75+
```{r child = "template-survival-mean.Rmd"}
76+
```
77+
7378
## Examples
7479

7580
The "Fitting and Predicting with parsnip" article contains [examples](https://parsnip.tidymodels.org/articles/articles/Examples.html#decision-tree-rpart) for `decision_tree()` with the `"rpart"` engine.

man/rmd/decision_tree_rpart.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ This model can utilize case weights during model fitting. To use them, see the d
115115

116116
The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights.
117117

118+
## Other details
119+
120+
121+
122+
Predictions of type `"time"` are predictions of the mean survival time.
123+
118124
## Examples
119125

120126
The "Fitting and Predicting with parsnip" article contains [examples](https://parsnip.tidymodels.org/articles/articles/Examples.html#decision-tree-rpart) for `decision_tree()` with the `"rpart"` engine.

man/rmd/proportional_hazards_glmnet.Rmd

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ predict(mod, pred_data, type = "survival", time = 500) %>%
8686

8787
Note that columns used in the `strata()` function _will_ also be estimated in the regular portion of the model (i.e., within the linear predictor).
8888

89-
# Linear predictor values
89+
```{r child = "template-survival-mean.Rmd"}
90+
```
91+
92+
## Linear predictor values
93+
9094
```{r child = "template-censored-linear-predictor.Rmd"}
9195
```
9296

man/rmd/proportional_hazards_glmnet.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,12 @@ predict(mod, pred_data, type = "survival", time = 500) %>%
9797

9898
Note that columns used in the `strata()` function _will_ also be estimated in the regular portion of the model (i.e., within the linear predictor).
9999

100-
# Linear predictor values
100+
101+
102+
Predictions of type `"time"` are predictions of the mean survival time.
103+
104+
## Linear predictor values
105+
101106

102107
Since risk regression and parametric survival models are modeling different characteristics (e.g. relative hazard versus event time), their linear predictors will be going in opposite directions.
103108

man/rmd/proportional_hazards_survival.Rmd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,14 @@ proportional_hazards() %>%
4242

4343
Note that columns used in the `strata()` function will not be estimated in the regular portion of the model (i.e., within the linear predictor).
4444

45+
```{r child = "template-survival-mean.Rmd"}
46+
```
4547

46-
# Linear predictor values
48+
## Linear predictor values
4749

4850
```{r child = "template-censored-linear-predictor.Rmd"}
4951
```
5052

51-
5253
## Case weights
5354

5455
```{r child = "template-uses-case-weights.Rmd"}

man/rmd/proportional_hazards_survival.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ proportional_hazards() %>%
8585
Note that columns used in the `strata()` function will not be estimated in the regular portion of the model (i.e., within the linear predictor).
8686

8787

88-
# Linear predictor values
88+
89+
Predictions of type `"time"` are predictions of the mean survival time.
90+
91+
## Linear predictor values
8992

9093

9194
Since risk regression and parametric survival models are modeling different characteristics (e.g. relative hazard versus event time), their linear predictors will be going in opposite directions.
@@ -96,7 +99,6 @@ tidymodels does not treat different models differently when computing performanc
9699

97100
This behavior can be changed by using the `increasing` argument when calling `predict()` on a \pkg{parsnip} model object.
98101

99-
100102
## Case weights
101103

102104

man/rmd/rand_forest_partykit.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ rand_forest() %>%
7373
```{r child = "template-tree-split-factors.Rmd"}
7474
```
7575

76+
## Other details
77+
78+
```{r child = "template-survival-median.Rmd"}
79+
```
80+
7681
## References
7782

7883
- [partykit: A Modular Toolkit for Recursive Partytioning in R](https://jmlr.org/papers/v16/hothorn15a.html)

man/rmd/rand_forest_partykit.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ rand_forest() %>%
9797

9898
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.
9999

100+
## Other details
101+
102+
103+
104+
Predictions of type `"time"` are predictions of the median survival time.
105+
100106
## References
101107

102108
- [partykit: A Modular Toolkit for Recursive Partytioning in R](https://jmlr.org/papers/v16/hothorn15a.html)

man/rmd/survival_reg_flexsurv.Rmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ The main interface for this model uses the formula method since the model specif
4242

4343
For this engine, stratification cannot be specified via [`strata()`], please see [flexsurv::flexsurvreg()] for alternative specifications.
4444

45+
```{r child = "template-survival-mean.Rmd"}
46+
```
47+
4548
## References
4649

4750
- Jackson, C. 2016. `flexsurv`: A Platform for Parametric Survival Modeling in R. _Journal of Statistical Software_, 70(8), 1 - 33.

man/rmd/survival_reg_flexsurv.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ The main interface for this model uses the formula method since the model specif
4444

4545
For this engine, stratification cannot be specified via [`strata()`], please see [flexsurv::flexsurvreg()] for alternative specifications.
4646

47+
48+
49+
Predictions of type `"time"` are predictions of the mean survival time.
50+
4751
## References
4852

4953
- Jackson, C. 2016. `flexsurv`: A Platform for Parametric Survival Modeling in R. _Journal of Statistical Software_, 70(8), 1 - 33.

man/rmd/survival_reg_survival.Rmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ survival_reg() %>%
5454
extract_fit_engine()
5555
```
5656

57+
```{r child = "template-survival-mean.Rmd"}
58+
```
59+
5760
## Case weights
5861

5962
```{r child = "template-uses-case-weights.Rmd"}

0 commit comments

Comments
 (0)