Main Content

Regression loss for generalized additive model (GAM)

returns the regression loss (`L`

= loss(`Mdl`

,`Tbl`

,`ResponseVarName`

)`L`

), a scalar representing how well the
generalized additive model `Mdl`

predicts the predictor data in
`Tbl`

compared to the true response values in
`Tbl.ResponseVarName`

.

The interpretation of `L`

depends on the loss function
(`'LossFun'`

) and weighting scheme (`'Weights'`

). In
general, better models yield smaller loss values. The default `'LossFun'`

value is `'mse'`

(mean squared error).

specifies options using one or more name-value arguments in addition to any of the input
argument combinations in previous syntaxes. For example, you can specify the loss function
and the observation weights.`L`

= loss(___,`Name,Value`

)