c_index {mlsurvlrnrs}R Documentation

c_index

Description

Calculate the Harrell's concordance index (C-index)

Usage

c_index(ground_truth, predictions)

Arguments

ground_truth

A 'survival::Surv' object with the ground truth.

predictions

A vector with predictions.

Details

A wrapper function around [glmnet::Cindex()] for use with 'mlexperiments'.

See Also

[glmnet::Cindex()]

Examples

set.seed(123)
gt <- survival::Surv(
  time = rnorm(100, 50, 15),
  event = sample(0:1, 100, TRUE)
)
preds <- rbeta(100, 2, 5)

c_index(gt, preds)


[Package mlsurvlrnrs version 0.0.3 Index]