Generalized additive models. Calls mgcv::gam() from package mgcv.

A gam formula specific to the task at hand is required for the formula parameter (see example and ?mgcv::formula.gam). Beware, if no formula is provided, a fallback formula is used that will make the gam behave like a glm (this behavior is required for the unit tests). Only features specified in the formula will be used, superseding columns with col_roles "feature" in the task.

## Dictionary

This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn():

### Method clone()

The objects of this class are cloneable with this method.

LearnerRegrGam$clone(deep = FALSE) #### Arguments deep Whether to make a deep clone. ## Examples  # simple example t = mlr3::tsk("mtcars") l = mlr3::lrn("regr.gam") l$param_set$values$formula = mpg ~ cyl + am + s(disp) + s(hp)
l$train(t) l$model
#>
#> Family: gaussian