smooth.ADAM.residuals

property ADAM.residuals: ndarray[tuple[int, ...], dtype[_ScalarType_co]]

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.

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))