pastas.noisemodels.ArNoiseModel.get_correction#

pastas.noisemodels.ArNoiseModel.get_correction(res: pandas.Series, p: pastas.typing.ArrayLike, tindex: pandas.DatetimeIndex) pandas.Series#

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.