Learn R Programming

neuralGAM (version 2.0.1)

print.neuralGAM: Short neuralGAM summary

Description

Default print method for a neuralGAM object.

Usage

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

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.

Arguments

x

A neuralGAM object.

...

Additional arguments (currently unused).

Author

Ines Ortega-Fernandez, Marta Sestelo.

Examples

Run this code
if (FALSE) {


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
)
print(ngam)
}

Run the code above in your browser using DataLab