etna.experimental.prediction_intervals.utils.residuals_matrices#

residuals_matrices(pipeline: BasePipeline, ts: TSDataset, n_folds: int = 5, stride: int | None = None) ndarray[source]#

Estimate residuals matrices with backtest.

Parameters:
  • pipeline (BasePipeline) – Pipeline for residuals estimation.

  • ts (TSDataset) – Dataset to estimate residuals.

  • n_folds (int) – Number of folds for backtest.

  • stride (int | None) – Number of points between folds. By default, is set to horizon.

Returns:

Residuals matrices for each segment. Array with shape: (n_folds, horizon, n_segments).

Return type:

ndarray