Default print method for a neuralGAM object.

# S3 method for class 'neuralGAM'
print(x, ...)

Arguments

x

A neuralGAM object.

...

Additional arguments (currently unused).

Value

Prints a brief summary of the fitted model including:

Distribution family

The distribution family used ("gaussian", "binomial", or "poisson").

Formula

The model formula.

Intercept value

The fitted intercept (\(\eta_0\)).

Mean Squared Error (MSE)

The training MSE of the model.

Training sample size

The number of observations used to train the model.

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()`
print(ngam)
#> Error: object 'ngam' not found
# }