Skip to contents

Survival Partition Tree where a significance test is used to determine the univariate splits. Calls partykit::ctree() from partykit.

Prediction types

This learner returns two prediction types:

  1. distr: a survival matrix in two dimensions, where observations are represented in rows and time points in columns. Calculated using the internal partykit::predict.party() function.

  2. crank: the expected mortality using mlr3proba::.surv_return().

Dictionary

This Learner can be instantiated via lrn():

lrn("surv.ctree")

Meta Information

Parameters

IdTypeDefaultLevelsRange
teststatcharacterquadraticquadratic, maximum-
splitstatcharacterquadraticquadratic, maximum-
splittestlogicalFALSETRUE, FALSE-
testtypecharacterBonferroniBonferroni, MonteCarlo, Univariate, Teststatistic-
nmaxuntyped--
alphanumeric0.05\([0, 1]\)
mincriterionnumeric0.95\([0, 1]\)
logmincriterionnumeric-\((-\infty, \infty)\)
minsplitinteger20\([1, \infty)\)
minbucketinteger7\([1, \infty)\)
minprobnumeric0.01\([0, \infty)\)
stumplogicalFALSETRUE, FALSE-
lookaheadlogicalFALSETRUE, FALSE-
MIAlogicalFALSETRUE, FALSE-
nresampleinteger9999\([1, \infty)\)
tolnumeric-\([0, \infty)\)
maxsurrogateinteger0\([0, \infty)\)
numsurrogatelogicalFALSETRUE, FALSE-
mtryintegerInf\([0, \infty)\)
maxdepthintegerInf\([0, \infty)\)
maxvarinteger-\([1, \infty)\)
multiwaylogicalFALSETRUE, FALSE-
splittryinteger2\([0, \infty)\)
intersplitlogicalFALSETRUE, FALSE-
majoritylogicalFALSETRUE, FALSE-
caseweightslogicalFALSETRUE, FALSE-
applyfununtyped--
coresintegerNULL\((-\infty, \infty)\)
saveinfologicalTRUETRUE, FALSE-
updatelogicalFALSETRUE, FALSE-
splitflavourcharacterctreectree, exhaustive-
clusteruntyped--
scoresuntyped--
doFitlogicalTRUETRUE, FALSE-
maxptsinteger25000\((-\infty, \infty)\)
absepsnumeric0.001\([0, \infty)\)
relepsnumeric0\([0, \infty)\)

References

Hothorn T, Zeileis A (2015). “partykit: A Modular Toolkit for Recursive Partytioning in R.” Journal of Machine Learning Research, 16(118), 3905-3909. http://jmlr.org/papers/v16/hothorn15a.html.

Hothorn T, Hornik K, Zeileis A (2006). “Unbiased Recursive Partitioning: A Conditional Inference Framework.” Journal of Computational and Graphical Statistics, 15(3), 651–674. doi:10.1198/106186006x133933 , https://doi.org/10.1198/106186006x133933.

See also

Author

adibender

Super classes

mlr3::Learner -> mlr3proba::LearnerSurv -> LearnerSurvCTree

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.

Usage


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerSurvCTree$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# Define the Learner
learner = lrn("surv.ctree")
print(learner)
#> 
#> ── <LearnerSurvCTree> (surv.ctree): Conditional Inference Tree ─────────────────
#> • Model: -
#> • Parameters: list()
#> • Packages: mlr3, mlr3proba, mlr3extralearners, partykit, coin, and sandwich
#> • Predict Types: [crank] and distr
#> • Feature Types: integer, numeric, factor, and ordered
#> • Encapsulation: none (fallback: -)
#> • Properties: weights
#> • Other settings: use_weights = 'use'

# Define a Task
task = tsk("grace")

# Create train and test set
ids = partition(task)

# Train the learner on the training ids
learner$train(task, row_ids = ids$train)

print(learner$model)
#> 
#> Model formula:
#> Surv(time, status, type = "right") ~ age + los + revasc + revascdays + 
#>     stchange + sysbp
#> 
#> Fitted party:
#> [1] root
#> |   [2] age <= 71
#> |   |   [3] revascdays <= 170
#> |   |   |   [4] revasc <= 0
#> |   |   |   |   [5] los <= 1: 1.000 (n = 14)
#> |   |   |   |   [6] los > 1: 60.000 (n = 66)
#> |   |   |   [7] revasc > 0: Inf (n = 222)
#> |   |   [8] revascdays > 170: Inf (n = 93)
#> |   [9] age > 71
#> |   |   [10] revascdays <= 177
#> |   |   |   [11] revasc <= 0
#> |   |   |   |   [12] sysbp <= 114
#> |   |   |   |   |   [13] revascdays <= 7: 2.000 (n = 15)
#> |   |   |   |   |   [14] revascdays > 7: 52.000 (n = 11)
#> |   |   |   |   [15] sysbp > 114
#> |   |   |   |   |   [16] stchange <= 0: 88.000 (n = 26)
#> |   |   |   |   |   [17] stchange > 0: 11.000 (n = 45)
#> |   |   |   [18] revasc > 0: Inf (n = 124)
#> |   |   [19] revascdays > 177: Inf (n = 54)
#> 
#> Number of inner nodes:     9
#> Number of terminal nodes: 10


# Make predictions for the test rows
predictions = learner$predict(task, row_ids = ids$test)

# Score the predictions
predictions$score()
#> surv.cindex 
#>   0.7550955