summary.survdnn: Summarize a Deep Survival Neural Network Model

View source: R/summary.survdnn.R

summary.survdnnR Documentation

Summarize a Deep Survival Neural Network Model

Description

Provides a structured summary of a fitted 'survdnn' model, including the network architecture, training configuration, and data characteristics. The summary is printed automatically with a styled header and sectioned output using {cli} and base formatting. The object is returned invisibly.

Usage

## S3 method for class 'survdnn'
summary(object, ...)

Arguments

object

An object of class '"survdnn"' returned by the [survdnn()] function.

...

Currently ignored (for future compatibility).

Value

Invisibly returns an object of class '"summary.survdnn"'.

Examples


if (requireNamespace("torch", quietly = TRUE) && torch::torch_is_installed()) {
  set.seed(42)
  sim_data <- data.frame(
    age = rnorm(100, 60, 10),
    sex = factor(sample(c("male", "female"), 100, TRUE)),
    trt = factor(sample(c("A", "B"), 100, TRUE)),
    time = rexp(100, 0.05),
    status = rbinom(100, 1, 0.7)
  )
  mod <- survdnn(
    survival::Surv(time, status) ~ age + sex + trt,
    data = sim_data,
    epochs = 50,
    verbose = FALSE
  )
  summary(mod)
}


survdnn documentation built on April 29, 2026, 9:07 a.m.