Skip to contents

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

Dictionary

This Learner can be instantiated via lrn():

lrn("surv.akritas")

Meta Information

Parameters

IdTypeDefaultLevelsRange
lambdanumeric0.5\([0, 1]\)
reverselogicalFALSETRUE, FALSE-
ntimenumeric150\([1, \infty)\)
round_timeinteger2\([0, \infty)\)

Installation

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

References

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

See also

Author

RaphaelS1

Super classes

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

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.

Usage


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.

Examples

# Define the Learner
learner = mlr3::lrn("surv.akritas")
print(learner)
#> <LearnerSurvAkritas:surv.akritas>: Akritas Estimator
#> * Model: -
#> * Parameters: list()
#> * Packages: mlr3, mlr3proba, mlr3extralearners, survivalmodels, distr6
#> * Predict Types:  [crank], distr
#> * Feature Types: logical, integer, numeric, character, factor
#> * Properties: -

# 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)
#> 
#>  Akritas Estimator 
#> 
#> Call:
#>   survivalmodels::akritas(data = data.table::setDF(task$data()),      time_variable = task$target_names[1L], status_variable = task$target_names[2L])
#> 
#> Response:
#>   Surv(time, status)
#> Features:
#>   {age, los, revasc, revascdays, stchange, sysbp} 


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

# Score the predictions
predictions$score()
#> surv.cindex 
#>         0.5