evaluate_survdnn {survdnn} | R Documentation |
Evaluate a survdnn Model Using Survival Metrics
Description
Computes evaluation metrics for a fitted 'survdnn' model at one or more time points. Supported metrics include the concordance index ('"cindex"'), Brier score ('"brier"'), and integrated Brier score ('"ibs"').
Usage
evaluate_survdnn(
model,
metrics = c("cindex", "brier", "ibs"),
times,
newdata = NULL
)
Arguments
model |
A fitted 'survdnn' model object. |
metrics |
A character vector of metric names: '"cindex"', '"brier"', '"ibs"'. |
times |
A numeric vector of evaluation time points. |
newdata |
Optional. A data frame on which to evaluate the model. Defaults to training data. |
Value
A tibble with evaluation results, containing at least 'metric', 'value', and possibly 'time'.
Examples
library(survival)
data(veteran)
mod <- survdnn(Surv(time, status) ~ age + karno + celltype,
data = veteran, epochs = 5, verbose = FALSE)
evaluate_survdnn(mod, metrics = c("cindex", "ibs"), times = c(30, 90, 180))
evaluate_survdnn(mod, metrics = "brier", times = c(30, 90, 180))
[Package survdnn version 0.6.0 Index]