Ranger Survival Learner
mlr_learners_surv.ranger.Rd
Random survival forest.
Calls ranger::ranger()
from package ranger.
Initial parameter values
mtry
:This hyperparameter can alternatively be set via our hyperparameter
mtry.ratio
asmtry = max(ceiling(mtry.ratio * n_features), 1)
. Note thatmtry
andmtry.ratio
are mutually exclusive.
Custom mlr3 defaults
num.threads
:Actual default:
NULL
, triggering auto-detection of the number of CPUs.Adjusted value: 1.
Reason for change: Conflicting with parallelization via future.
Dictionary
This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn()
:
$get("surv.ranger")
mlr_learnerslrn("surv.ranger")
Meta Information
Task type: “surv”
Predict Types: “crank”, “distr”
Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered”
Required Packages: mlr3, mlr3proba, mlr3extralearners, ranger
Parameters
Id | Type | Default | Levels | Range |
alpha | numeric | 0.5 | \((-\infty, \infty)\) | |
always.split.variables | untyped | - | - | |
holdout | logical | FALSE | TRUE, FALSE | - |
importance | character | - | none, impurity, impurity_corrected, permutation | - |
keep.inbag | logical | FALSE | TRUE, FALSE | - |
max.depth | integer | NULL | \([0, \infty)\) | |
min.node.size | integer | 5 | \([1, \infty)\) | |
minprop | numeric | 0.1 | \((-\infty, \infty)\) | |
mtry | integer | - | \([1, \infty)\) | |
mtry.ratio | numeric | - | \([0, 1]\) | |
num.random.splits | integer | 1 | \([1, \infty)\) | |
num.threads | integer | 1 | \([1, \infty)\) | |
num.trees | integer | 500 | \([1, \infty)\) | |
oob.error | logical | TRUE | TRUE, FALSE | - |
regularization.factor | untyped | 1 | - | |
regularization.usedepth | logical | FALSE | TRUE, FALSE | - |
replace | logical | TRUE | TRUE, FALSE | - |
respect.unordered.factors | character | ignore | ignore, order, partition | - |
sample.fraction | numeric | - | \([0, 1]\) | |
save.memory | logical | FALSE | TRUE, FALSE | - |
scale.permutation.importance | logical | FALSE | TRUE, FALSE | - |
seed | integer | NULL | \((-\infty, \infty)\) | |
split.select.weights | numeric | - | \([0, 1]\) | |
splitrule | character | logrank | logrank, extratrees, C, maxstat | - |
verbose | logical | TRUE | TRUE, FALSE | - |
write.forest | logical | TRUE | TRUE, FALSE | - |
References
Wright, N. M, Ziegler, Andreas (2017). “ranger: A Fast Implementation of Random Forests for High Dimensional Data in C++ and R.” Journal of Statistical Software, 77(1), 1--17. doi:10.18637/jss.v077.i01 .
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
-> LearnerSurvRanger
Methods
Method importance()
The importance scores are extracted from the model slot variable.importance
.
Returns
Named numeric()
.
Examples
learner = mlr3::lrn("surv.ranger")
print(learner)
#> <LearnerSurvRanger:surv.ranger>: Random Forest
#> * Model: -
#> * Parameters: num.threads=1
#> * Packages: mlr3, mlr3proba, mlr3extralearners, ranger
#> * Predict Types: crank, [distr]
#> * Feature Types: logical, integer, numeric, character, factor, ordered
#> * Properties: importance, oob_error, weights
# available parameters:
learner$param_set$ids()
#> [1] "alpha" "always.split.variables"
#> [3] "holdout" "importance"
#> [5] "keep.inbag" "max.depth"
#> [7] "min.node.size" "minprop"
#> [9] "mtry" "mtry.ratio"
#> [11] "num.random.splits" "num.threads"
#> [13] "num.trees" "oob.error"
#> [15] "regularization.factor" "regularization.usedepth"
#> [17] "replace" "respect.unordered.factors"
#> [19] "sample.fraction" "save.memory"
#> [21] "scale.permutation.importance" "seed"
#> [23] "split.select.weights" "splitrule"
#> [25] "verbose" "write.forest"