fix: Ensemble Forecasting Model postprocessing fit and transform#830
Merged
MvLieshout merged 6 commits intorelease/v4.0.0from Mar 9, 2026
Merged
Conversation
… 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>
…ostprocessing-bug
Signed-off-by: Marnix van Lieshout <marnix.van.lieshout@alliander.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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:
model_specific_postprocessingandcombiner_postprocessingfields to theEnsembleForecastingModelto allow distinct postprocessing steps for each forecaster and for the combiner, in addition to the existing sharedpostprocessingpipeline._predict_forecasterand_predict_combinermethods 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]_fit_combinermethod to fit the combiner postprocessing pipeline on training predictions, ensuring proper transformation during training.Workflow Configuration Improvements:
create_ensemble_forecasting_workflowfunction to construct and inject the new postprocessing pipelines (common_postprocessing,model_specific_postprocessing, andcombiner_postprocessing) into the model, replacing the previous monolithic postprocessing approach. [1] [2]TYPE_CHECKINGfor 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.