% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print.R
\name{print.poisson_superlearner}
\alias{print.poisson_superlearner}
\title{Print method for \code{poisson_superlearner}}
\usage{
\method{print}{poisson_superlearner}(x, cause = 1, model = "sl", ...)
}
\arguments{
\item{x}{\code{poisson_superlearner} object 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 fitted meta-learner \code{print()} method when
\code{cause} is a single integer.}
}
\value{
Invisibly returns \code{x}.
}
\description{
Prints a compact description of the fitted Poisson Super Learner, including the
number of base learners, the meta-learner, the time-grid used, and competing-risk
structure. Optionally prints the fitted meta-learner for a given cause.
}
\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
)

print(fit, cause = NULL)

}
