configurator.config_entsoe.ConfigEntsoe

configurator.config_entsoe.ConfigEntsoe(
    country_code='DE',
    periods=default_periods(),
    lags_consider=(lambda: list(range(1, 24)))(),
    train_size=(lambda: pd.Timedelta(days=(3 * 365)))(),
    end_train_default='2025-12-31 00:00+00:00',
    delta_val=(lambda: pd.Timedelta(hours=(24 * 7 * 10)))(),
    predict_size=24,
    cv_block_size=None,
    refit_size=7,
    random_state=314159,
    n_hyperparameters_trials=20,
    data_filename='interim/energy_load.csv',
    targets=None,
    use_outlier_detection=True,
    contamination=0.01,
    imputation_method='weighted',
    window_size=72,
    imputation_window_size=None,
    use_exogenous_features=True,
    latitude=51.5136,
    longitude=7.4653,
    timezone='UTC',
    state='NW',
    include_weather_windows=False,
    include_holiday_features=False,
    include_holiday_adjacency_features=False,
    use_population_weighted_weather=False,
    per_zone_weather=False,
    zone_weather_locations=None,
    include_degree_hours=False,
    include_apparent_temperature=False,
    degree_hours_base_heating=15.0,
    degree_hours_base_cooling=22.0,
    include_ephemeris_features=False,
    include_day_type_features=False,
    include_school_holiday_features=False,
    poly_features_degree=1,
    max_poly_features=10,
    poly_mi_n_jobs=-1,
    poly_mi_sample_size=4000,
    include_covid_infection_rate=False,
    include_entsoe_forecast_load=False,
    include_entsoe_renewable_forecast=False,
    include_entsoe_net_load=False,
    include_entsoe_day_ahead_price=False,
    include_football_match_window=False,
    include_energy_saving_window=False,
    index_name='Time (UTC)',
    bounds=None,
    verbose=False,
    cache_home=None,
    n_trials_optuna=15,
    n_trials_spotoptim=10,
    n_initial_spotoptim=5,
    max_time_spotoptim=None,
    warm_start_lags=(lambda: list(DEFAULT_WARM_START_LAGS))(),
    task='lazy',
    agg_weights=None,
    forecaster_factory=None,
    lgbm_n_jobs=1,
    data_loader=None,
    test_data_loader=None,
    auto_save_models=True,
    data_frame_name='default',
    number_folds=10,
    on_weather_failure='raise',
    on_exog_provider_failure='raise',
    exog_max_gap_hours=0,
    exog_max_tail_gap_hours=0,
    exog_provider_window='full',
    target_qc_range_mw=None,
    target_qc_step_mw=None,
    target_qc_window_days=None,
    target_corruption_policy='abort',
    target_max_heal_hours=0,
    target_anchor_zone_hours=168,
    target_qc_deviation_mw=None,
    target_qc_deviation_ref=None,
    target_qc_deviation_slots=2,
    retrain_max_age=(lambda: pd.Timedelta(days=7))(),
)

Configuration for the ENTSO-E forecasting pipeline.

Single-target counterpart to ConfigMulti, used by the ENTSO-E CLI (spotforecast2.tasks.task_entsoe) and any single-target pipeline routed through spotforecast2.multitask.runner.run(config_cls=ConfigEntsoe).

ConfigEntsoe inherits every field and method of ConfigMulti — so any feature flag added to ConfigMulti is available here automatically (this is what closes the historical feature-flag parity gap structurally, rather than via a hand-maintained mirror). It differs from ConfigMulti in exactly two ways:

See ConfigMulti for the full field reference (training/validation windows, feature toggles, exogenous-provider flags, target-corruption knobs, …).

Parameters

Name Type Description Default
index_name str Datetime column name used when resetting the index. Defaults to "Time (UTC)". 'Time (UTC)'
retrain_max_age pd.Timedelta Maximum age of a trained model before a retrain is forced. Defaults to pd.Timedelta(days=7). (lambda: pd.Timedelta(days=7))()

Examples

import pandas as pd
from spotforecast2_safe.configurator.config_entsoe import ConfigEntsoe
from spotforecast2_safe.configurator.config_multi import ConfigMulti

config = ConfigEntsoe(country_code="DE")
# ENTSO-E-specific defaults:
print("index_name:", config.index_name)
print("retrain_max_age:", config.retrain_max_age)
assert config.index_name == "Time (UTC)"
assert config.retrain_max_age == pd.Timedelta(days=7)

# Inherits the full ConfigMulti surface, incl. the opt-in feature flags:
assert isinstance(config, ConfigMulti)
config = ConfigEntsoe(
    include_ephemeris_features=True,
    include_day_type_features=True,
    include_degree_hours=True,
)
print("ephemeris:", config.include_ephemeris_features)
print("predict_size:", config.predict_size)
index_name: Time (UTC)
retrain_max_age: 7 days 00:00:00
ephemeris: True
predict_size: 24

Methods

Name Description
get_params Get parameters for this configuration object.
set_params Set the parameters of this configuration object.

get_params

configurator.config_entsoe.ConfigEntsoe.get_params(deep=True)

Get parameters for this configuration object.

Parameters

Name Type Description Default
deep bool If True, will return the parameters for this configuration and contained sub-objects that are estimators. True

Returns

Name Type Description
params Dict[str, object] Dictionary of parameter names mapped to their values.

Examples

from spotforecast2_safe.configurator.config_multi import ConfigMulti
config = ConfigMulti(country_code="FR")
p = config.get_params()
print(f"country_code: {p['country_code']}")
print(f"Predict size: {p['predict_size']}")
print(f"Random state: {p['random_state']}")
print(f"index_name: {p['index_name']}")
print(f"bounds: {p['bounds']}")
print(f"agg_weights: {p['agg_weights']}")
country_code: FR
Predict size: 24
Random state: 314159
index_name: DateTime
bounds: None
agg_weights: None

set_params

configurator.config_entsoe.ConfigEntsoe.set_params(params=None, **kwargs)

Set the parameters of this configuration object.

Parameters

Name Type Description Default
params Dict[str, object] Optional dictionary of parameter names mapped to their new values. None
**kwargs object Additional parameter names mapped to their new values. It supports configuring nested ‘Period’ objects using the periods__<name>__<param> notation. {}

Returns

Name Type Description
ConfigMulti ConfigMulti The configuration instance with updated parameters (supports method chaining).

Examples

from spotforecast2_safe.configurator.config_multi import ConfigMulti
config = ConfigMulti()
_ = config.set_params(country_code="FR", predict_size=48)
print(f"country_code: {config.country_code}")
print(f"Predict size: {config.predict_size}")
print(f"Random state: {config.random_state}")

# Deep parameter setting
_ = config.set_params(periods__daily__n_periods=24)
print(next(p.n_periods for p in config.periods if p.name == "daily"))
country_code: FR
Predict size: 48
Random state: 314159
24