Survival Nelson-Aalen Estimator Learner
mlr_learners_surv.nelson.Rd
Non-parametric estimator of the cumulative hazard rate function.
Calls survival::survfit()
from survival.
Prediction types
This learner returns two prediction types:
distr
: a survival matrix in two dimensions, where observations are represented in rows and time points in columns. The cumulative hazard \(H(t)\) is calculated using the train data and the default parameters of thesurvival::survfit()
function, i.e.ctype = 1
, which uses the Nelson-Aalen formula. Then for each test observation the survival curve is \(S(t) = \exp{(-H(t))}\).crank
: the expected mortality usingmlr3proba::.surv_return()
.
Meta Information
Task type: “surv”
Predict Types: “crank”, “distr”
Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered”
Required Packages: mlr3, mlr3proba, mlr3extralearners, survival, pracma
References
Nelson, Wayne (1969). “Hazard plotting for incomplete failure data.” Journal of Quality Technology, 1(1), 27–52.
Nelson, Wayne (1972). “Theory and applications of hazard plotting for censored failure data.” Technometrics, 14(4), 945–966.
Aalen, Odd (1978). “Nonparametric inference for a family of counting processes.” The Annals of Statistics, 701–726.
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
-> LearnerSurvNelson
Examples
# Define the Learner
learner = mlr3::lrn("surv.nelson")
print(learner)
#> <LearnerSurvNelson:surv.nelson>: Nelson-Aalen Estimator
#> * Model: -
#> * Parameters: list()
#> * Packages: mlr3, mlr3proba, mlr3extralearners, survival, pracma
#> * Predict Types: [crank], distr
#> * Feature Types: logical, integer, numeric, character, factor, ordered
#> * Properties: missings
# Define a Task
task = mlr3::tsk("grace")
# Create train and test set
ids = mlr3::partition(task)
# Train the learner on the training ids
learner$train(task, row_ids = ids$train)
print(learner$model)
#> Call: survfit(formula = task$formula(1), data = task$data())
#>
#> n events median 0.95LCL 0.95UCL
#> [1,] 670 211 NA NA NA
# Make predictions for the test rows
predictions = learner$predict(task, row_ids = ids$test)
# Score the predictions
predictions$score()
#> surv.cindex
#> 0.5