pastas.stats.metrics.picp#

picp(obs, bounds)[source]#

Compute the prediction interval coverage probability (PICP).

Parameters
obspandas.Series

Pandas Series with the measured time series and a DateTimeIndex.

boundsDataFrame

DataFrame with the lower (first column) and upper (second columns) bounds of the prediction intervals.

Parameters
rac{1}{N} sum _{i=1}^N a_i,

a_i = egin{cases}

1 & ext{if }h_i in [hat{h_i}^L, hat{h_i}^U], 0 & ext{otherwise}

end{cases}

Examples

>>> import pandas as pd
>>> import numpy as np
>>> from pastas.stats import picp
>>> obs = pd.Series(np.random.rand(100),
                    index=pd.date_range("2000-01-01", periods=100))
>>> bounds = pd.DataFrame(np.random.rand(100, 2), index=obs.index)
>>> picp(obs, bounds)