-
Notifications
You must be signed in to change notification settings - Fork 92
Updates for new aorsf
engine for rand_forest()
#828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e687b7f
rand_forest_aorsf included in docs
bcjaeger 968a09f
make engine arg tunable
hfrick 9f6a5be
add `fit_xy()` method for `rand_forest()`
hfrick 35eeda1
Update `models.tsv`
hfrick 4632852
Update engine docs for `aorsf`
hfrick 6416c85
re-document to update `.md` and `.Rd`
hfrick aad4cfd
Merge commit 'fddc746309facc3c56c5c209c7cdf1b9de0508e2'
hfrick f5391b0
Merge branch 'main' into aorsf
topepo fe98262
Merge branch 'main' into bcjaeger-aorsf
topepo 9683be4
add note on case weights
hfrick 639fbdb
update status
hfrick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#' Oblique random survival forests via aorsf | ||
#' | ||
#' [aorsf::orsf()] fits a model that creates a large number of decision | ||
#' trees, each de-correlated from the others. The final prediction uses all | ||
#' predictions from the individual trees and combines them. | ||
#' | ||
#' @includeRmd man/rmd/rand_forest_aorsf.md details | ||
#' | ||
#' @name details_rand_forest_aorsf | ||
#' @keywords internal | ||
NULL | ||
|
||
# See inst/README-DOCS.md for a description of how these files are processed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
```{r, child = "aaa.Rmd", include = FALSE} | ||
``` | ||
|
||
`r descr_models("rand_forest", "aorsf")` | ||
|
||
## Tuning Parameters | ||
|
||
```{r aorsf-param-info, echo = FALSE} | ||
defaults <- | ||
tibble::tibble(parsnip = c("trees", "min_n", "mtry"), | ||
default = c("500L", "5L", "ceiling(sqrt(n_predictors))")) | ||
|
||
param <- | ||
rand_forest() %>% | ||
set_engine("aorsf") %>% | ||
set_mode("censored regression") %>% | ||
make_parameter_list(defaults) %>% | ||
distinct() | ||
``` | ||
|
||
This model has `r nrow(param)` tuning parameters: | ||
|
||
```{r aorsf-param-list, echo = FALSE, results = "asis"} | ||
param$item | ||
``` | ||
|
||
Additionally, this model has one engine-specific tuning parameter: | ||
|
||
* `split_min_stat`: Minimum test statistic required to split a node. Default is `3.841459` for the log-rank test, which is roughly a p-value of 0.05. | ||
|
||
|
||
# Translation from parsnip to the original package (censored regression) | ||
|
||
`r uses_extension("rand_forest", "aorsf", "censored regression")` | ||
|
||
```{r aorsf-creg} | ||
library(censored) | ||
|
||
rand_forest() %>% | ||
set_engine("aorsf") %>% | ||
set_mode("censored regression") %>% | ||
translate() | ||
``` | ||
|
||
## Preprocessing requirements | ||
|
||
```{r child = "template-tree-split-factors.Rmd"} | ||
``` | ||
|
||
## Case weights | ||
|
||
```{r child = "template-uses-case-weights.Rmd"} | ||
``` | ||
|
||
## Other details | ||
|
||
Predictions of survival probability at a time exceeding the maximum observed event time are the predicted survival probability at the maximum observed time in the training data. | ||
|
||
## References | ||
|
||
- Jaeger BC, Long DL, Long DM, Sims M, Szychowski JM, Min YI, Mcclure LA, Howard G, Simon N. Oblique random survival forests. Annals of applied statistics 2019 Sep; 13(3):1847-83. DOI: 10.1214/19-AOAS1261 | ||
|
||
- Jaeger BC, Welden S, Lenoir K, Pajewski NM. aorsf: An R package for supervised learning using the oblique random survival forest. Journal of Open Source Software 2022, 7(77), 1 4705. https://doi.org/10.21105/joss.04705. | ||
|
||
- Jaeger BC, Welden S, Lenoir K, Speiser JL, Segar MW, Pandey A, Pajewski NM. Accelerated and interpretable oblique random survival forests. arXiv e-prints 2022 Aug; arXiv-2208. URL: https://arxiv.org/abs/2208.01129 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
|
||
|
||
|
||
For this engine, there is a single mode: censored regression | ||
|
||
## Tuning Parameters | ||
|
||
|
||
|
||
This model has 3 tuning parameters: | ||
|
||
- `trees`: # Trees (type: integer, default: 500L) | ||
|
||
- `min_n`: Minimal Node Size (type: integer, default: 5L) | ||
|
||
- `mtry`: # Randomly Selected Predictors (type: integer, default: ceiling(sqrt(n_predictors))) | ||
|
||
Additionally, this model has one engine-specific tuning parameter: | ||
|
||
* `split_min_stat`: Minimum test statistic required to split a node. Default is `3.841459` for the log-rank test, which is roughly a p-value of 0.05. | ||
|
||
|
||
# Translation from parsnip to the original package (censored regression) | ||
|
||
The **censored** extension package is required to fit this model. | ||
|
||
|
||
```r | ||
library(censored) | ||
|
||
rand_forest() %>% | ||
set_engine("aorsf") %>% | ||
set_mode("censored regression") %>% | ||
translate() | ||
``` | ||
|
||
``` | ||
## Random Forest Model Specification (censored regression) | ||
## | ||
## Computational engine: aorsf | ||
## | ||
## Model fit template: | ||
## aorsf::orsf(formula = missing_arg(), data = missing_arg(), weights = missing_arg()) | ||
``` | ||
|
||
## Preprocessing requirements | ||
|
||
|
||
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. | ||
|
||
## Case weights | ||
|
||
|
||
This model can utilize case weights during model fitting. To use them, see the documentation in [case_weights] and the examples on `tidymodels.org`. | ||
|
||
The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. | ||
|
||
## Other details | ||
|
||
Predictions of survival probability at a time exceeding the maximum observed event time are the predicted survival probability at the maximum observed time in the training data. | ||
|
||
## References | ||
|
||
- Jaeger BC, Long DL, Long DM, Sims M, Szychowski JM, Min YI, Mcclure LA, Howard G, Simon N. Oblique random survival forests. Annals of applied statistics 2019 Sep; 13(3):1847-83. DOI: 10.1214/19-AOAS1261 | ||
|
||
- Jaeger BC, Welden S, Lenoir K, Pajewski NM. aorsf: An R package for supervised learning using the oblique random survival forest. Journal of Open Source Software 2022, 7(77), 1 4705. https://doi.org/10.21105/joss.04705. | ||
|
||
- Jaeger BC, Welden S, Lenoir K, Speiser JL, Segar MW, Pandey A, Pajewski NM. Accelerated and interpretable oblique random survival forests. arXiv e-prints 2022 Aug; arXiv-2208. URL: https://arxiv.org/abs/2208.01129 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.