fit_gam: Fit gam model

Description Usage Arguments Value

Description

Fit a generalized additive model using mgcv::gam. See ??gam for more details

Usage

1
2
fit_gam(st, model_name = "gam", fold_col = NULL, fold_id = NULL,
  return_model_obj = F)

Arguments

st

stacker governor. Stacking governer object with an gam model initialized. See ??mbgstacking::init_gam for more info.

model_name

character vector. Name of the model to be run

fold_col

character vector. Denotes the name of the column designating the fold for crossval

fold_id

Numeric. Designates the value in fold col that should be held out

return_model_obj

logical. Denotes whether the function should return the earth object or just predictions.

Value

List object with a data.table of predictions. If return_model_obj==T, the gam command and model object are returned as well


dahcase/mbgstacking documentation built on May 20, 2019, 4:08 p.m.