pvanalytics.quality.data_shifts.detect_data_shifts#

pvanalytics.quality.data_shifts.detect_data_shifts(series, filtering=True, use_default_models=True, method=None, cost=None, penalty=40)#

Detect data shifts in a time series of daily values.

Warning

If the passed time series is less than 2 years in length, it will not be corrected for seasonality. Data shift detection will be run on the min-max normalized time series with no seasonality correction.

Parameters
  • series (Pandas series with datetime index.) – Time series of daily PV data values, which can include irradiance and power data.

  • filtering (Boolean, default True.) – Whether or not to filter out outliers and stale data from the time series. If True, then this data is filtered out before running the data shift detection sequence. If False, this data is not filtered out. Default set to True.

  • use_default_models (Boolean, default True) – If True, then default change point detection search parameters are used. For time series shorter than 2 years in length, the search function is rpt.Window with model=’rbf’, width=50 and penalty=30. For time series 2 years or longer in length, the search function is rpt.BottomUp with model=’rbf’ and penalty=40.

  • method (ruptures search method instance or None, default None.) – Ruptures search method instance. See https://centre-borelli.github.io/ruptures-docs/user-guide/.

  • cost (str or None, default None) – Cost function passed to the ruptures changepoint search instance. See https://centre-borelli.github.io/ruptures-docs/user-guide/

  • penalty (int, default 40) – Penalty value passed to the ruptures changepoint detection method. Default set to 40.

Returns

Series of boolean values with the input Series’ datetime index, where detected changepoints are labeled as True, and all other values are labeled as False.

Return type

Pandas Series

References

1

Perry K., and Muller, M. “Automated shift detection in sensor-based PV power and irradiance time series”, 2022 IEEE 48th Photovoltaic Specialists Conference (PVSC).

Examples using pvanalytics.quality.data_shifts.detect_data_shifts#

PV Fleets QA Process: Temperature

PV Fleets QA Process: Temperature

PV Fleets QA Process: Irradiance

PV Fleets QA Process: Irradiance

PV Fleets QA Process: Power

PV Fleets QA Process: Power

Data Shift Detection & Filtering

Data Shift Detection & Filtering