UnobservedComponentsResult._series#

UnobservedComponentsResult._series()[source]#

Aligned per-observation output: the decomposition itself.

Return type:

dict[str, NDArray[double]]

Returns:

"observed", "level", then "slope", "cycle" and "seasonal" where present, then "irregular", each of shape (n,).

Example

>>> import numpy as np
>>> rng = np.random.default_rng(0)
>>> y = np.cumsum(0.2 * rng.standard_normal(200)) + rng.standard_normal(200)
>>> list(UnobservedComponents(y).fit()._series())
['observed', 'level', 'irregular']
>>> list(UnobservedComponents(y, trend="smooth").fit()._series())
['observed', 'level', 'slope', 'irregular']