pastas.noisemodels.ArNoiseModel.get_correction#

ArNoiseModel.get_correction(res, p, tindex)[source]#

Get the correction for a forecast using the noise model.

Parameters
  • res (Series) – The residual series.

  • p (ArrayLike) – The parameters of the noise model.

  • tindex (DatetimeIndex) – The index of the forecast.

Returns

The correction to the forecast.

Return type

Series

Notes

The correction is calculated as:

\[correction = \exp(-\Delta t / \alpha) * last_residual\]

where \(\Delta t\) is the time difference between the last observation and the forecast, and \(\alpha\) is the noise parameter.