pastas.noisemodels.NoiseModel.weights#

NoiseModel.weights(res, p)[source]#

Method to calculate the weights for the noise.

Parameters
  • res (pandas.Series) – Pandas Series with the residuals to compute the weights for. The Series index must be a DatetimeIndex.

  • p (numpy.ndarray) – numpy array with the parameters used in the noise model.

Returns

w – Series of the weights.

Return type

pandas.Series

Notes

Weights are

\[w = 1 / sqrt((1 - exp(-2 \Delta t / \alpha)))\]

which are then normalized so that sum(w) = len(res).