Summarizes a fitted neuralGAM object: family, formula, sample size, intercept, training MSE, per-term neural net settings, per-term NN layer configuration, and training history. If a linear component is present, its coefficients are also reported.

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

Arguments

object

A neuralGAM object.

...

Additional arguments (currently unused).

Value

Invisibly returns object. Prints a human-readable summary.

Author

Ines Ortega-Fernandez, Marta Sestelo

Examples

# \dontrun{

library(neuralGAM)
dat <- sim_neuralGAM_data()
train <- dat$train
test  <- dat$test

ngam <- neuralGAM(
  y ~ s(x1) + x2 + s(x3),
  data = train,
  num_units = 128,
  family = "gaussian",
  activation = "relu",
  learning_rate = 0.001,
  bf_threshold = 0.001,
  max_iter_backfitting = 10,
  max_iter_ls = 10,
  seed = 1234
)
#> Hint: To use tensorflow with `py_require()`, call `py_require("tensorflow")` at the start of the R session
#> Error in tensorflow::set_random_seed(seed): TensorFlow not installed, please run `tensorflow::install_tensorflow()`
summary(ngam)
#> Error: object 'ngam' not found
# }