Survival Nelson-Aalen Estimator Learner
mlr_learners_surv.nelson.Rd
Non-parametric estimator of the cumulative hazard rate function.
Calls survival::survfit()
from survival.
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 212 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