mlr_learners_surv.nelson: Survival Nelson-Aalen Estimator Learner

mlr_learners_surv.nelsonR Documentation

Survival Nelson-Aalen Estimator Learner

Description

Non-parametric estimator of the cumulative hazard rate function. Calls survival::survfit() from survival.

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. The cumulative hazard H(t) is calculated using the train data and the default parameters of the survival::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))}.

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

Dictionary

This Learner can be instantiated via lrn():

lrn("surv.nelson")

Meta Information

  • Task type: “surv”

  • Predict Types: “crank”, “distr”

  • Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered”

  • Required Packages: mlr3, mlr3proba, mlr3extralearners, survival, pracma

Parameters

Empty ParamSet

Super classes

mlr3::Learner -> mlr3proba::LearnerSurv -> LearnerSurvNelson

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage
LearnerSurvNelson$new()

Method clone()

The objects of this class are cloneable with this method.

Usage
LearnerSurvNelson$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

RaphaelS1

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

Examples


# Define the Learner
learner = mlr3::lrn("surv.nelson")
print(learner)

# 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)


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

# Score the predictions
predictions$score()


mlr-org/mlr3extralearners documentation built on Dec. 21, 2024, 2:21 p.m.