Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions data/liander2024-energy-forecasting-benchmark
Submodule liander2024-energy-forecasting-benchmark added at ec2863
16 changes: 12 additions & 4 deletions examples/benchmarks/liander_2024_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,15 @@
N_PROCESSES = 1 if True else multiprocessing.cpu_count() # Amount of parallel processes to use for the benchmark

ensemble_type = "learned_weights" # "stacking", "learned_weights" or "rules"
base_models = ["lgbm", "gblinear"] # combination of "lgbm", "gblinear", "xgboost" and "lgbm_linear"
base_models = [
"lgbm",
"gblinear",
] # combination of "lgbm", "gblinear", "xgboost" and "lgbm_linear"
combiner_model = (
"lgbm" # "lgbm", "xgboost", "rf" or "logistic" for learned weights combiner, gblinear for stacking combiner
)

model = "Ensemble_" + "_".join(base_models) + "_" + ensemble_type + "_" + combiner_model
model = "Ensemble_contributions_" + "_".join(base_models) + "_" + ensemble_type + "_" + combiner_model

# Model configuration
FORECAST_HORIZONS = [LeadTime.from_string("PT36H")] # Forecast horizon(s)
Expand Down Expand Up @@ -90,7 +93,12 @@
relative_humidity_column="relative_humidity_2m",
energy_price_column="EPEX_NL",
forecast_combiner_sample_weight_exponent=0,
forecaster_sample_weight_exponent={"gblinear": 1, "lgbm": 0, "xgboost": 0, "lgbm_linear": 0},
forecaster_sample_weight_exponent={
"gblinear": 1,
"lgbm": 0,
"xgboost": 0,
"lgbm_linear": 0,
},
)


Expand All @@ -111,7 +119,7 @@
start_time = time.time()
create_liander2024_benchmark_runner(
storage=LocalBenchmarkStorage(base_path=OUTPUT_PATH / model),
data_dir=Path("../data/liander2024-energy-forecasting-benchmark"),
data_dir=Path("data/liander2024-energy-forecasting-benchmark"),
callbacks=[StrictExecutionCallback()],
).run(
forecaster_factory=create_openstef4_preset_backtest_forecaster(
Expand Down
Loading
Loading