| cindex_mtl | R Documentation |
Computes a concordance index (C-index) adapted for the multi-task survival framework. Predictions across tasks are aggregated by row-sum to produce a single score per patient, then concordance is evaluated over pairs where at least one member has a fully observed outcome.
cindex_mtl(true.label.mat, pred.label.mat)
true.label.mat |
A numeric matrix of true response labels with
dimensions |
pred.label.mat |
A numeric matrix of predicted response values
with dimensions |
The effective survival time for each patient is derived as the highest task index where the true label is positive (i.e., the last threshold at which the patient was progression-free).
A patient is considered "uncensored" only if all task labels are
non-NA. Concordant pairs require both a correct ordering
of effective survival times and a matching ordering of predicted
scores.
A numeric value between 0 and 1 (higher is better). A value of 0.5 indicates random concordance.
The following limitations are documented and flagged for future investigation:
No credit for tied predictions or tied survival times
Strict censoring: uncensored requires all tasks observed
Equal weighting of all tasks in the row-sum aggregation
predict.orthoMTL for generating the
prediction matrix.
# Simulate a small multi-task prediction scenario
set.seed(42)
n <- 30; n_tasks <- 4
SurvTime <- rexp(n, rate = 0.1)
Event <- rbinom(n, 1, 0.7)
thresholds <- c(4, 6, 10, 15)
Y <- create_longitudinal_labels(SurvTime, Event, thresholds)
# Simulate imperfect predictions (add noise to true labels)
pred <- Y
pred[is.na(pred)] <- 0.5
pred <- pred + matrix(rnorm(n * n_tasks, sd = 0.3), n, n_tasks)
cindex_mtl(Y, pred)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.