Survival Random Forest SRC Learner
mlr_learners_surv.rfsrc.Rd
Random survival forest.
Calls randomForestSRC::rfsrc()
from randomForestSRC.
Details
randomForestSRC::predict.rfsrc()
returns both cumulative hazard function (chf) and
survival function (surv) but uses different estimators to derive these. chf
uses a
bootstrapped Nelson-Aalen estimator, (Ishwaran, 2008) whereas surv
uses a bootstrapped
Kaplan-Meier estimator. The choice of which estimator to use is given by the extra
estimator
hyper-parameter, default is nelson
.
Dictionary
This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn()
:
$get("surv.rfsrc")
mlr_learnerslrn("surv.rfsrc")
Meta Information
Task type: “surv”
Predict Types: “crank”, “distr”
Feature Types: “logical”, “integer”, “numeric”, “factor”
Required Packages: mlr3, mlr3proba, mlr3extralearners, randomForestSRC, pracma
Parameters
Id | Type | Default | Levels | Range |
ntree | integer | 1000 | \([1, \infty)\) | |
mtry | integer | - | \([1, \infty)\) | |
mtry.ratio | numeric | - | \([0, 1]\) | |
nodesize | integer | 15 | \([1, \infty)\) | |
nodedepth | integer | - | \([1, \infty)\) | |
splitrule | character | logrank | logrank, bs.gradient, logrankscore | - |
nsplit | integer | 10 | \([0, \infty)\) | |
importance | character | FALSE | FALSE, TRUE, none, permute, random, anti | - |
block.size | integer | 10 | \([1, \infty)\) | |
bootstrap | character | by.root | by.root, by.node, none, by.user | - |
samptype | character | swor | swor, swr | - |
samp | untyped | - | - | |
membership | logical | FALSE | TRUE, FALSE | - |
sampsize | untyped | - | - | |
sampsize.ratio | numeric | - | \([0, 1]\) | |
na.action | character | na.omit | na.omit, na.impute | - |
nimpute | integer | 1 | \([1, \infty)\) | |
ntime | integer | - | \([1, \infty)\) | |
cause | integer | - | \([1, \infty)\) | |
proximity | character | FALSE | FALSE, TRUE, inbag, oob, all | - |
distance | character | FALSE | FALSE, TRUE, inbag, oob, all | - |
forest.wt | character | FALSE | FALSE, TRUE, inbag, oob, all | - |
xvar.wt | untyped | - | - | |
split.wt | untyped | - | - | |
forest | logical | TRUE | TRUE, FALSE | - |
var.used | character | FALSE | FALSE, all.trees, by.tree | - |
split.depth | character | FALSE | FALSE, all.trees, by.tree | - |
seed | integer | - | \((-\infty, -1]\) | |
do.trace | logical | FALSE | TRUE, FALSE | - |
statistics | logical | FALSE | TRUE, FALSE | - |
get.tree | untyped | - | - | |
outcome | character | train | train, test | - |
ptn.count | integer | 0 | \([0, \infty)\) | |
estimator | character | nelson | nelson, kaplan | - |
cores | integer | 1 | \([1, \infty)\) | |
save.memory | logical | FALSE | TRUE, FALSE | - |
Initial parameter values
mtry
:This hyperparameter can alternatively be set via the added hyperparameter
mtry.ratio
asmtry = max(ceiling(mtry.ratio * n_features), 1)
. Note thatmtry
andmtry.ratio
are mutually exclusive.
sampsize
:This hyperparameter can alternatively be set via the added hyperparameter
sampsize.ratio
assampsize = max(ceiling(sampsize.ratio * n_obs), 1)
. Note thatsampsize
andsampsize.ratio
are mutually exclusive.
References
Ishwaran H, Kogalur UB, Blackstone EH, Lauer MS (2008). “Random survival forests.” The Annals of Applied Statistics, 2(3). doi:10.1214/08-aoas169 , https://doi.org/10.1214/08-aoas169.
Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5--32. ISSN 1573-0565, doi:10.1023/A:1010933404324 .
See also
as.data.table(mlr_learners)
for a table of available Learners in the running session (depending on the loaded packages).Chapter in the mlr3book: https://mlr3book.mlr-org.com/basics.html#learners
mlr3learners for a selection of recommended learners.
mlr3cluster for unsupervised clustering learners.
mlr3pipelines to combine learners with pre- and postprocessing steps.
mlr3tuning for tuning of hyperparameters, mlr3tuningspaces for established default tuning spaces.
Super classes
mlr3::Learner
-> mlr3proba::LearnerSurv
-> LearnerSurvRandomForestSRC
Methods
Method importance()
The importance scores are extracted from the model slot importance
.
Returns
Named numeric()
.
Examples
learner = mlr3::lrn("surv.rfsrc")
print(learner)
#> <LearnerSurvRandomForestSRC:surv.rfsrc>: Random Forest
#> * Model: -
#> * Parameters: list()
#> * Packages: mlr3, mlr3proba, mlr3extralearners, randomForestSRC, pracma
#> * Predict Types: [crank], distr
#> * Feature Types: logical, integer, numeric, factor
#> * Properties: importance, missings, oob_error, weights
# available parameters:
learner$param_set$ids()
#> [1] "ntree" "mtry" "mtry.ratio" "nodesize"
#> [5] "nodedepth" "splitrule" "nsplit" "importance"
#> [9] "block.size" "bootstrap" "samptype" "samp"
#> [13] "membership" "sampsize" "sampsize.ratio" "na.action"
#> [17] "nimpute" "ntime" "cause" "proximity"
#> [21] "distance" "forest.wt" "xvar.wt" "split.wt"
#> [25] "forest" "var.used" "split.depth" "seed"
#> [29] "do.trace" "statistics" "get.tree" "outcome"
#> [33] "ptn.count" "estimator" "cores" "save.memory"