Skip to content

fix: Ensemble Forecasting Model postprocessing fit and transform#830

Merged
MvLieshout merged 6 commits intorelease/v4.0.0from
fix/Fix-EnsembleForecastingModel-postprocessing-bug
Mar 9, 2026
Merged

fix: Ensemble Forecasting Model postprocessing fit and transform#830
MvLieshout merged 6 commits intorelease/v4.0.0from
fix/Fix-EnsembleForecastingModel-postprocessing-bug

Conversation

@MvLieshout
Copy link
Collaborator

@MvLieshout MvLieshout commented Mar 6, 2026

This pull request enhances the flexibility and clarity of the ensemble forecasting workflow by introducing more granular postprocessing steps for both individual forecasters and the combiner. It also improves code organization and type safety in the workflow configuration. The most important changes are:

Model Architecture and Processing Pipeline:

  • Added model_specific_postprocessing and combiner_postprocessing fields to the EnsembleForecastingModel to allow distinct postprocessing steps for each forecaster and for the combiner, in addition to the existing shared postprocessing pipeline.
  • Updated the _predict_forecaster and _predict_combiner methods to apply the new postprocessing pipelines at the appropriate stages, ensuring that predictions are transformed as intended before being passed to the combiner and before final output. [1] [2]
  • Modified the _fit_combiner method to fit the combiner postprocessing pipeline on training predictions, ensuring proper transformation during training.

Workflow Configuration Improvements:

  • Refactored the create_ensemble_forecasting_workflow function to construct and inject the new postprocessing pipelines (common_postprocessing, model_specific_postprocessing, and combiner_postprocessing) into the model, replacing the previous monolithic postprocessing approach. [1] [2]
  • Improved type safety and code clarity in the workflow configuration by using TYPE_CHECKING for type hints and reorganizing imports. [1] [2]

These changes provide greater modularity and control over the preprocessing and postprocessing steps in ensemble forecasting workflows, making it easier to customize and extend the pipeline for different use cases.

… postprocessing.

Signed-off-by: Marnix van Lieshout <marnix.van.lieshout@alliander.com>
Signed-off-by: Marnix van Lieshout <marnix.van.lieshout@alliander.com>
Signed-off-by: Marnix van Lieshout <marnix.van.lieshout@alliander.com>
Signed-off-by: Marnix van Lieshout <marnix.van.lieshout@alliander.com>
@MvLieshout MvLieshout requested a review from a team March 6, 2026 16:41
@github-actions github-actions bot added the fix Something isn't working label Mar 6, 2026
@MvLieshout MvLieshout marked this pull request as draft March 6, 2026 16:43
@MvLieshout MvLieshout changed the title fix: ensemble forecasting model postprocessing fit and transform fix: Ensemble Forecasting Model postprocessing fit and transform Mar 9, 2026
Signed-off-by: Marnix van Lieshout <marnix.van.lieshout@alliander.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 9, 2026

@MvLieshout MvLieshout marked this pull request as ready for review March 9, 2026 10:28
Copy link
Collaborator

@egordm egordm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@MvLieshout MvLieshout merged commit ea3cf85 into release/v4.0.0 Mar 9, 2026
4 checks passed
@MvLieshout MvLieshout deleted the fix/Fix-EnsembleForecastingModel-postprocessing-bug branch March 9, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants