% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/explainability.R
\name{plot_survival_heatmap}
\alias{plot_survival_heatmap}
\title{Survival Probability Heatmap}
\usage{
plot_survival_heatmap(object, newdata, times)
}
\arguments{
\item{object}{A fitted SuperSurv object}

\item{newdata}{Test covariates (e.g., \code{X_te[1:50, ]})}

\item{times}{The time grid to visualize}
}
\value{
A \code{ggplot} object visualizing the SHAP values.
}
\description{
Survival Probability Heatmap
}
\examples{
if (requireNamespace("glmnet", quietly = TRUE)) {
  data("metabric", package = "SuperSurv")
  dat <- metabric[1:80, ]
  x_cols <- grep("^x", names(dat))[1:5]
  X <- dat[, x_cols, drop = FALSE]
  times <- seq(20, 120, by = 20)

  fit <- SuperSurv(
    time = dat$duration,
    event = dat$event,
    X = X,
    newdata = X,
    new.times = times,
    event.library = c("surv.coxph", "surv.ridge"),
    cens.library = c("surv.coxph"),
    control = list(saveFitLibrary = TRUE)
  )

  plot_survival_heatmap(
    object = fit,
    newdata = X[1:20, , drop = FALSE],
    times = times
  )
}
}
