smooth.AutoADAM.residuals
- property AutoADAM.residuals: ndarray[tuple[Any, ...], dtype[_ScalarT]]
Return model residuals (errors from fitting).
For additive error models, residuals are y_t - fitted_t. For multiplicative error models, residuals are y_t / fitted_t - 1. For combined models, returns residuals computed from the IC-weighted combined fitted values: y_t - combined_fitted_t.
The log-domain and multiplicative-domain distributions are the exception:
dlnorm,dllaplace,dls,dlgnorm,dgammaanddinvgaussreturn the ratioy_t / fitted_trather than an error, because that is the quantity their densities are written in. Mirrors R’sresiduals.adam(R/adam.R:5383-5403):abs(1 + e/f)for an additive error and1 + efor a multiplicative one.- Returns:
Array of residuals from the fitted model.
- Return type:
NDArray
- Raises:
ValueError – If the model has not been fitted yet.
Examples
>>> model = ADAM(model="AAN") >>> model.fit(y) >>> errors = model.residuals >>> rmse = np.sqrt(np.mean(errors**2))