mlr_learners_surv.akritas | R Documentation |
Survival akritas estimator.
Calls survivalmodels::akritas()
from package 'survivalmodels'.
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 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.
crank
: the expected mortality using survivalmodels::surv_to_risk()
.
This Learner can be instantiated via lrn():
lrn("surv.akritas")
Task type: “surv”
Predict Types: “crank”, “distr”
Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”
Required Packages: mlr3, mlr3proba, mlr3extralearners, survivalmodels, distr6
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) |
|
Package 'survivalmodels' is not on CRAN and has to be install from GitHub via
remotes::install_github("RaphaelS1/survivalmodels")
.
mlr3::Learner
-> mlr3proba::LearnerSurv
-> LearnerSurvAkritas
new()
Creates a new instance of this R6 class.
LearnerSurvAkritas$new()
clone()
The objects of this class are cloneable with this method.
LearnerSurvAkritas$clone(deep = FALSE)
deep
Whether to make a deep clone.
RaphaelS1
Akritas, G M (1994). “Nearest neighbor estimation of a bivariate distribution under random censoring.” The Annals of Statistics, 1299–1327.
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.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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.