if (FALSE) {
library(neuralGAM)
dat <- sim_neuralGAM_data()
train <- dat$train
test <- dat$test
ngam0 <- neuralGAM(
y ~ s(x1) + x2 + s(x3),
data = train, family = "gaussian",
num_units = 128, uncertainty_method = "epistemic"
)
link_ci <- predict(ngam0, type = "link", interval = "confidence",
level = 0.95, forward_passes = 10)
resp_ci <- predict(ngam0, type = "response", interval = "confidence",
level = 0.95, forward_passes = 10)
trm_se <- predict(ngam0, type = "terms",
se.fit = TRUE, forward_passes = 10)
}
Run the code above in your browser using DataLab