solarforecastarbiter.datamodel.ReportParameters

class solarforecastarbiter.datamodel.ReportParameters(name: str, start: pandas._libs.tslibs.timestamps.Timestamp, end: pandas._libs.tslibs.timestamps.Timestamp, object_pairs: Tuple[Union[solarforecastarbiter.datamodel.ForecastObservation, solarforecastarbiter.datamodel.ForecastAggregate], ...], metrics: Tuple[str, ...] = ('mae', 'mbe', 'rmse'), categories: Tuple[str, ...] = ('total', 'date', 'hour'), forecast_fill_method: str = 'drop', filters: Tuple[solarforecastarbiter.datamodel.BaseFilter, ...] = <factory>, costs: Tuple[solarforecastarbiter.datamodel.Cost, ...] = (), timezone: Optional[str] = None)[source]

Parameters required to define and generate a Report.

Parameters:
  • name (str) – Name of the report.
  • start (pandas.Timestamp) – Start time of the reporting period.
  • end (pandas.Timestamp) – End time of the reporting period.
  • forecast_fill_method ({'drop', 'forward', float}) – Indicates what process to use for handling missing forecasts.
  • object_pairs (Tuple of ForecastObservation or ForecastAggregate) – Paired Forecasts and Observations or Aggregates to be analyzed in the report.
  • metrics (Tuple of str) – Metrics to be computed in the report.
  • categories (Tuple of str) – Categories to compute and organize metrics over in the report.
  • filters (Tuple of Filters) – Filters to be applied to the data in the report.
  • costs (Tuple of Costs) – Cost parameters that can be referenced in object_pairs to compute cost metrics for that pair. Each object pair must have the ‘cost’ parameter set to None (no cost calculation will be performed) or one of the names of these costs.
  • timezone (str or None) – The timezone in which to compute daily, hourly, etc. statistics. If None, inferred from data in object_pairs.
__init__(name: str, start: pandas._libs.tslibs.timestamps.Timestamp, end: pandas._libs.tslibs.timestamps.Timestamp, object_pairs: Tuple[Union[solarforecastarbiter.datamodel.ForecastObservation, solarforecastarbiter.datamodel.ForecastAggregate], ...], metrics: Tuple[str, ...] = ('mae', 'mbe', 'rmse'), categories: Tuple[str, ...] = ('total', 'date', 'hour'), forecast_fill_method: str = 'drop', filters: Tuple[solarforecastarbiter.datamodel.BaseFilter, ...] = <factory>, costs: Tuple[solarforecastarbiter.datamodel.Cost, ...] = (), timezone: Optional[str] = None) → None

Methods

__init__(name, start, end, object_pairs, …)
from_dict(input_dict[, raise_on_extra]) Construct a dataclass from the given dict, matching keys with the class fields.
replace(**kwargs) Convience wrapper for dataclasses.replace() to create a new dataclasses from the old with the given keys replaced.
to_dict() Convert the dataclass into a dictionary suitable for uploading to the API.

Attributes

categories
costs
forecast_fill_method
metrics
timezone