c_index | R Documentation |
Calculate the Harrell's concordance index (C-index)
c_index(ground_truth, predictions)
ground_truth |
A |
predictions |
A vector with predictions. |
A wrapper function around glmnet::Cindex()
for use with mlexperiments
.
glmnet::Cindex()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.