| compare | R Documentation |
Evaluates each learner in models on the same set of resampling splits, so
the per-fold values are paired across models. Returns a leaderboard plus the
full per-split table.
compare(
formula,
data,
models,
specs = list(),
times = NULL,
resampling = cv(),
metrics = c("cindex", "ibs"),
tune = FALSE,
ncores = 1,
...
)
formula |
A survival formula. |
data |
A data frame. |
models |
Character vector of learner ids, or a list mixing ids and
custom learners (see |
specs |
Named list of engine-argument lists, keyed by learner label
( |
times |
Evaluation grid; |
resampling |
A resampling spec (default |
metrics |
Character vector from |
tune |
Logical. When |
ncores |
Cores for the split loop (default |
... |
Unused. |
A survalis_compare object: leaderboard (model x metric, mean and
se), per_split (long), times, resampling, metrics, models, tuned.
cmp <- compare(Surv(time, status) ~ age + karno + celltype, veteran,
models = c("coxph", "ranger"), times = c(90, 180, 365),
resampling = cv(3))
cmp
plot(cmp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.