Learn R Programming

survex (version 1.2.0)

loss_adapt_mlr3proba: Adapt mlr3proba measures for use with survex

Description

This function allows for usage of standardized measures from the mlr3proba package with survex.

Usage

loss_adapt_mlr3proba(measure, reverse = FALSE, ...)

Value

a function with standardized parameters (y_true, risk, surv, times) that can be used to calculate loss

Arguments

measure
  • a MeasureSurv object from the mlr3proba package, the object to adapt

reverse
  • boolean, FALSE by default, whether the metric should be reversed in order to be treated as loss (for permutational variable importance we need functions with lower values indicating better performance). If TRUE, the new metric value will be (1 - metric_value)

...
  • other parameters, currently ignored

Examples

Run this code

if(FALSE){
  measure <- msr("surv.calib_beta")
  mlr_measure <- loss_adapt_mlr3proba(measure)
}

Run the code above in your browser using DataLab