process_forecast_observations(forecast_observations, filters, forecast_fill_method, start, end, data, timezone, costs=())¶
Convert ForecastObservations into ProcessedForecastObservations applying any filters and resampling to align forecast and observation.
- forecast_observations (list of solarforecastarbiter.datamodel.ForecastObservation, solarforecastarbiter.datamodel.ForecastAggregate) – Pairs to process
- filters (list of solarforecastarbiter.datamodel.BaseFilter) – Filters to apply to each pair.
- forecast_fill_method (str) – Indicates what process to use for handling missing forecasts. Currently supports : ‘drop’, ‘forward’, and bool or numeric value.
- start (pandas.Timestamp) – Start date and time for assessing forecast performance.
- end (pandas.Timestamp) – End date and time for assessing forecast performance.
- data (dict) – Dict with keys that are the Forecast/Observation/Aggregate object
and values that are the corresponding pandas.Series/DataFrame for
the object. Keys must also include all Forecast objects assigned
reference_forecastattributes of the
- timezone (str) – Timezone that data should be converted to
- costs (tuple of
solarforecastarbiter.datamodel.Cost) – Costs that are referenced by any pairs. Pairs and costs are matched by the Cost name.
list of ProcessedForecastObservation
The logic is as follows.
For each forecast, observation pair in
- Remove observation data points with
quality_flagin filters. Remaining observation series is discontinuous.
- Fill missing forecast data points according to
- Fill missing reference forecast data points according to
- Resample observations to match forecast intervals. A minimum of 10% of the observation intervals within a forecast interval must be valid (not flagged or previously missing) else the resampled observation is NaN.
- Drop remaining NaN observation and forecast values.
- Align observations to match forecast times. Observation times for which there is not a matching forecast time are dropped.
ProcessedForecastObservationwith resampled, aligned data and metadata.