mlr_learners_surv.akritas: Survival Akritas Estimator Learner

mlr_learners_surv.akritasR Documentation

Survival Akritas Estimator Learner

Description

Survival akritas estimator. Calls survivalmodels::akritas() from package 'survivalmodels'.

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 survivalmodels::predict.akritas() function. The survival matrix uses the unique time points from the training set. We advise to set the parameter ntime which allows to adjust the granularity of these time points to a reasonable number (e.g. 150). This avoids large execution times during prediction.

  2. crank: the expected mortality using survivalmodels::surv_to_risk().

Dictionary

This Learner can be instantiated via lrn():

lrn("surv.akritas")

Meta Information

Parameters

Id Type Default Levels Range
lambda numeric 0.5 [0, 1]
reverse logical FALSE TRUE, FALSE -
ntime integer NULL [1, \infty)
round_time integer 2 [0, \infty)

Installation

Package 'survivalmodels' is not on CRAN and has to be install from GitHub via remotes::install_github("RaphaelS1/survivalmodels").

Super classes

mlr3::Learner -> mlr3proba::LearnerSurv -> LearnerSurvAkritas

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage
LearnerSurvAkritas$new()

Method clone()

The objects of this class are cloneable with this method.

Usage
LearnerSurvAkritas$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

RaphaelS1

References

Akritas, G M (1994). “Nearest neighbor estimation of a bivariate distribution under random censoring.” The Annals of Statistics, 1299–1327.

See Also

Examples


# Define the Learner
learner = mlr3::lrn("surv.akritas")
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 Nov. 11, 2024, 11:11 a.m.