% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/evaluation.R
\name{eval_summary}
\alias{eval_summary}
\title{Evaluate SuperSurv predictions on test data}
\usage{
eval_summary(
  object,
  newdata,
  time,
  event,
  eval_times,
  risk_time = stats::median(eval_times),
  verbose = FALSE
)
}
\arguments{
\item{object}{A fitted \code{SuperSurv} object.}

\item{newdata}{A data.frame of test covariates.}

\item{time}{Numeric vector of observed follow-up times for the test set.}

\item{event}{Numeric vector of event indicators for the test set.}

\item{eval_times}{Numeric vector of times at which to evaluate survival
predictions.}

\item{risk_time}{Numeric. The specific time horizon used when extracting risk
scores for Uno C-index. Defaults to the median of \code{eval_times}.}

\item{verbose}{Logical; if \code{TRUE}, progress messages are shown.}
}
\value{
An object of class \code{"SuperSurv_eval"} containing benchmark
metrics for the ensemble and base learners.
}
\description{
Computes the integrated Brier score (IBS), Uno C-index, and integrated area
under the curve (iAUC) for the SuperSurv ensemble and all individual base
learners.
}
\examples{
data("metabric", package = "SuperSurv")
dat <- metabric[1:80, ]
x_cols <- grep("^x", names(dat))[1:3]

fit <- SuperSurv(
  time = dat$duration,
  event = dat$event,
  X = dat[, x_cols, drop = FALSE],
  new.times = seq(50, 200, by = 50),
  event.library = c("surv.coxph", "surv.km"),
  cens.library = c("surv.coxph", "surv.km")
)

res <- eval_summary(
  object = fit,
  newdata = dat[, x_cols, drop = FALSE],
  time = dat$duration,
  event = dat$event,
  eval_times = seq(50, 200, by = 50)
)

res

}
