ReferenceForecast#
- class ReferenceForecast(*, aggregate_reference_timesteps: bool = False, aggregation_time_window: str = '6 hours', aggregate_reference_timeseries: bool = False, df: DataFrame = None)[source]#
Model for generating a synthetic reference forecast timeseries.
- Parameters:
aggregate_reference_timeseries (
bool) – Whether to aggregate the reference timeseries. Defaults to False.aggregation_time_window (
str) – The time window for aggregation. Defaults to “6 hours”.df (
ps.DataFrame) – The DataFrame containing the timeseries data.
Notes
This model generates a synthetic reference forecast timeseries based on an input timeseries DataFrame. It assigns the values from the input timeseries to the forecast timeseries based on value time, optionally aggregrating values within a specified time window.
This requires specific timeseries to work with.
Methods
Generate synthetic reference forecast timeseries.
Attributes
model_computed_fieldsmodel_configConfiguration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
model_extraGet extra fields set during validation.
model_fieldsmodel_fields_setReturns the set of fields that have been explicitly set on this model instance.
aggregate_reference_timeseriesaggregation_time_windowdfaggregate_reference_timesteps- generate(ev: Evaluation, reference_sdf: DataFrame, template_sdf: DataFrame, partition_by: List[str], output_configuration_name: str) DataFrame[source]#
Generate synthetic reference forecast timeseries.
- Parameters:
ev (
Evaluation) – The Evaluation object containing the evaluation context.reference_sdf (
ps.DataFrame) – The DataFrame containing the reference timeseries data.template_sdf (
ps.DataFrame) – The DataFrame containing the template forecast timeseries data.partition_by (
List[str]) – The list of columns to partition by when aggregating the time step.output_configuration_name (
str) – The configuration name to assign to the output timeseries.
- Returns:
ps.DataFrame– The DataFrame containing the generated reference forecast timeseries.