Survival Akritas Estimator Learner
mlr_learners_surv.akritas.Rd
Survival akritas estimator.
Calls survivalmodels::akritas()
from package 'survivalmodels'.
Prediction types
This learner returns two prediction types:
distr
: a survival matrix in two dimensions, where observations are represented in rows and time points in columns. Calculated using the internalsurvivalmodels::predict.akritas()
function. The survival matrix uses the unique time points from the training set. We advise to set the parameterntime
which allows to adjust the granularity of these time points to a reasonable number (e.g.150
). This avoids large execution times during prediction.crank
: the expected mortality usingsurvivalmodels::surv_to_risk()
.
Meta Information
Task type: “surv”
Predict Types: “crank”, “distr”
Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”
Required Packages: mlr3, mlr3proba, mlr3extralearners, survivalmodels, distr6
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")
.
References
Akritas, G M (1994). “Nearest neighbor estimation of a bivariate distribution under random censoring.” The Annals of Statistics, 1299–1327.
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
-> LearnerSurvAkritas
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