% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summary.R
\name{summary.poisson_superlearner}
\alias{summary.poisson_superlearner}
\title{Summarize a fitted Poisson Super Learner object}
\usage{
\method{summary}{poisson_superlearner}(object, cause = NULL, model = "sl", ...)
}
\arguments{
\item{object}{\code{poisson_superlearner} returned by \code{\link[=Superlearner]{Superlearner()}}.}

\item{cause}{\code{numeric(1)} or \code{NULL}. Which cause’s meta-learner fit to print.
If \code{NULL}, prints one line per cause (classes only) instead of printing the full
fitted objects.}

\item{model}{Scalar model selector. Default is \code{"sl"} for the stacked super learner.
Other allowed values are:
\describe{
\item{\code{0} or \code{"sl"}}{Use the super learner prediction.}
\item{learner label}{Use one stored base learner by its label in
\code{object$data_info$learners_labels}.}
\item{\code{"learner_j"}}{Use the \code{j}-th stored learner.}
\item{integer \code{j >= 1}}{Use the \code{j}-th stored learner.}
}}

\item{...}{Passed to the underlying \code{coef()} method for the fitted meta-learner
(learner-dependent; e.g. \code{s} for \code{glmnet}).}
}
\value{
Invisibly returns a \code{list} with elements:
\describe{
\item{cross_validation_deviance}{\code{data.table} (or \code{NULL}).}
\item{meta_coefficients}{List of length \code{n_crisks} with cause-specific coefficient objects (or \code{NULL}).}
}
}
\description{
Prints:
\enumerate{
\item a compact description of the fitted ensemble,
\item cross-validated deviances for base learners (when available),
\item cause-specific meta-learner coefficients (stacking weights).
}
}
\examples{
d <- simulateStenoT1(30, competing_risks = TRUE)

learners <- list(
  lasso = Learner_glmnet(
    covariates = "sex",
    alpha = 1,
    lambda = 0.01,
    cross_validation = FALSE
  ),
  ridge = Learner_glmnet(
    covariates = c("sex", "value_LDL"),
    alpha = 0,
    lambda = 0.01,
    cross_validation = FALSE
  )
)

fit <- Superlearner(
  data = d,
  id = "id",
  status = "status_cvd",
  event_time = "time_cvd",
  learners = learners,
  number_of_nodes = 3,
  nfold = 2
)

s <- summary(fit, cause = 1)
names(s)


}
