mlr_learners_surv.nelson | R Documentation |
Non-parametric estimator of the cumulative hazard rate function.
Calls survival::survfit()
from survival.
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 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))}
.
crank
: the expected mortality using mlr3proba::.surv_return()
.
This Learner can be instantiated via lrn():
lrn("surv.nelson")
Task type: “surv”
Predict Types: “crank”, “distr”
Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered”
Required Packages: mlr3, mlr3proba, mlr3extralearners, survival, pracma
Empty ParamSet
mlr3::Learner
-> mlr3proba::LearnerSurv
-> LearnerSurvNelson
new()
Creates a new instance of this R6 class.
LearnerSurvNelson$new()
clone()
The objects of this class are cloneable with this method.
LearnerSurvNelson$clone(deep = FALSE)
deep
Whether to make a deep clone.
RaphaelS1
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.
Dictionary of Learners: mlr3::mlr_learners.
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.
# 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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.