Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request implements residual learning for stereo reconstruction models and adds training evaluation capabilities. The core change shifts from predicting absolute direction/energy values to predicting residuals relative to DispBDT baseline predictions. This approach allows the XGBoost model to learn corrections to an existing baseline method rather than learning from scratch.
Changes:
- Implements residual learning architecture: models now predict corrections to DispBDT predictions rather than absolute values
- Adds target standardization during training to balance the contribution of direction (Xoff, Yoff) and energy features in multi-target learning
- Adds plot_training_evaluation.py script to visualize training curves and assess model convergence
- Updates hyperparameters: reduces learning rate, increases n_estimators, adds regularization, enables early stopping
- Filters training data to remove events with invalid energy reconstruction (ErecS <= 0)
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/eventdisplay_ml/scripts/train_xgb_stereo.py | Updated docstring to explain residual learning approach |
| src/eventdisplay_ml/scripts/plot_training_evaluation.py | New script to plot training/validation curves from saved models |
| src/eventdisplay_ml/models.py | Implements residual learning, target standardization, inverse transformation in inference, adds eval_set to regression training, removes eval_set from classification training |
| src/eventdisplay_ml/hyper_parameters.py | Updates hyperparameters for better regularization and early stopping |
| src/eventdisplay_ml/features.py | Changes targets from absolute values to residuals |
| src/eventdisplay_ml/evaluate.py | Updates evaluation to work with residual predictions and reconstruct absolute values |
| src/eventdisplay_ml/data_processing.py | Adds residual computation logic, filters invalid energy events |
| pyproject.toml | Adds new script entry point for training evaluation plotting |
| docs/changes/53.feature.md | Documents the new features |
| .github/copilot-instructions.md | Updates documentation to reflect residual learning architecture |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.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.
No description provided.