Skip to contents

Flexible parametric spline learner. Calls flexsurv::flexsurvspline() from flexsurv.

Dictionary

This Learner can be instantiated via lrn():

lrn("surv.flexible")

Meta Information

Parameters

IdTypeDefaultLevelsRange
bhazarduntyped--
kinteger0\([0, \infty)\)
knotsuntyped--
bknotsuntyped--
scalecharacterhazardhazard, odds, normal-
timescalecharacterloglog, identity-
splinecharacterrprp, splines2ns-
initsuntyped--
rtruncuntyped--
fixedparsuntyped--
clnumeric0.95\([0, 1]\)
maxiterinteger30\((-\infty, \infty)\)
rel.tolerancenumeric1e-09\((-\infty, \infty)\)
toler.cholnumeric1e-10\((-\infty, \infty)\)
debuginteger0\([0, 1]\)
outer.maxinteger10\((-\infty, \infty)\)

Prediction types

This learner returns three prediction types:

  1. lp: a vector containing the linear predictors (relative risk scores), where each score corresponds to a specific test observation. Calculated using flexsurv::flexsurvspline() and the estimated coefficients. For fitted coefficients, \(\hat{\beta} = (\hat{\beta_0},...,\hat{\beta_P})\), and the test data covariates \(X^T = (X_0,...,X_P)^T\), where \(X_0\) is a column of \(1\)s, the linear predictor vector is \(lp = \hat{\beta} X^T\).

  2. distr: a survival matrix in two dimensions, where observations are represented in rows and time points in columns. Calculated using predict.flexsurvreg().

  3. crank: same as lp.

Initial parameter values

  • k:

    • Actual default: 0

    • Initial value: 1

    • Reason for change: The default value of 0 is equivalent to, and a much less efficient implementation of, LearnerSurvParametric.

References

Royston, Patrick, Parmar, KB M (2002). “Flexible parametric proportional-hazards and proportional-odds models for censored survival data, with application to prognostic modelling and estimation of treatment effects.” Statistics in medicine, 21(15), 2175–2197.

See also

Author

RaphaelS1

Super classes

mlr3::Learner -> mlr3proba::LearnerSurv -> LearnerSurvFlexible

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

LearnerSurvFlexible$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

lrn("surv.flexible")
#> <LearnerSurvFlexible:surv.flexible>: Flexible Parametric Splines
#> * Model: -
#> * Parameters: k=1
#> * Packages: mlr3, mlr3proba, mlr3extralearners, flexsurv, pracma
#> * Predict Types:  [crank], distr, lp
#> * Feature Types: logical, integer, numeric, factor
#> * Properties: weights