Skip to contents

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():

mlr_learners$get("surv.rfsrc")
lrn("surv.rfsrc")

Meta Information

Parameters

IdTypeDefaultLevelsRange
ntreeinteger1000\([1, \infty)\)
mtryinteger-\([1, \infty)\)
mtry.rationumeric-\([0, 1]\)
nodesizeinteger15\([1, \infty)\)
nodedepthinteger-\([1, \infty)\)
splitrulecharacterlogranklogrank, bs.gradient, logrankscore-
nsplitinteger10\([0, \infty)\)
importancecharacterFALSEFALSE, TRUE, none, permute, random, anti-
block.sizeinteger10\([1, \infty)\)
bootstrapcharacterby.rootby.root, by.node, none, by.user-
samptypecharactersworswor, swr-
sampuntyped--
membershiplogicalFALSETRUE, FALSE-
sampsizeuntyped--
sampsize.rationumeric-\([0, 1]\)
na.actioncharacterna.omitna.omit, na.impute-
nimputeinteger1\([1, \infty)\)
ntimeinteger-\([1, \infty)\)
causeinteger-\([1, \infty)\)
proximitycharacterFALSEFALSE, TRUE, inbag, oob, all-
distancecharacterFALSEFALSE, TRUE, inbag, oob, all-
forest.wtcharacterFALSEFALSE, TRUE, inbag, oob, all-
xvar.wtuntyped--
split.wtuntyped--
forestlogicalTRUETRUE, FALSE-
var.usedcharacterFALSEFALSE, all.trees, by.tree-
split.depthcharacterFALSEFALSE, all.trees, by.tree-
seedinteger-\((-\infty, -1]\)
do.tracelogicalFALSETRUE, FALSE-
statisticslogicalFALSETRUE, FALSE-
get.treeuntyped--
outcomecharactertraintrain, test-
ptn.countinteger0\([0, \infty)\)
estimatorcharacternelsonnelson, kaplan-
coresinteger1\([1, \infty)\)
save.memorylogicalFALSETRUE, FALSE-
perf.typecharacter-none-

Custom mlr3 parameters

  • mtry:

    • This hyperparameter can alternatively be set via the added hyperparameter mtry.ratio as mtry = max(ceiling(mtry.ratio * n_features), 1). Note that mtry and mtry.ratio are mutually exclusive.

  • sampsize:

    • This hyperparameter can alternatively be set via the added hyperparameter sampsize.ratio as sampsize = max(ceiling(sampsize.ratio * n_obs), 1). Note that sampsize and sampsize.ratio are mutually exclusive.

  • cores: This value is set as the option rf.cores during training and is set to 1 by default.

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

Author

RaphaelS1

Super classes

mlr3::Learner -> mlr3proba::LearnerSurv -> LearnerSurvRandomForestSRC

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.


Method importance()

The importance scores are extracted from the model slot importance.

Usage

LearnerSurvRandomForestSRC$importance()

Returns

Named numeric().


Method selected_features()

Selected features are extracted from the model slot var.used.

Usage

LearnerSurvRandomForestSRC$selected_features()

Returns

character().


Method oob_error()

OOB error extracted from the model slot err.rate.

Usage

LearnerSurvRandomForestSRC$oob_error()

Returns

numeric().


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerSurvRandomForestSRC$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

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"   
#> [37] "perf.type"