pastas.noisemodels.ArNoiseModel.weights#
- pastas.noisemodels.ArNoiseModel.weights(res: pandas.Series, p: pastas.typing.ArrayLike) pandas.Series#
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 (array_like) – NumPy array with the parameters used in the noise model.
- Returns:
w – Series of the weights.
- Return type:
Notes
Weights are
\[\begin{split}w = 1 / sqrt((1 - exp(-2 \\Delta t / \\alpha)))\end{split}\]which are then normalized so that sum(w) = len(res).