Default print method for a neuralGAM
object.
# S3 method for class 'neuralGAM'
print(x, ...)
Prints a brief summary of the fitted model including:
The distribution family used ("gaussian"
, "binomial"
, or "poisson"
).
The model formula.
The fitted intercept (\(\eta_0\)).
The training MSE of the model.
The number of observations used to train the model.
# \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
# }