ENH: implement fusion with the global model in prediction#54
ENH: implement fusion with the global model in prediction#54martinfleis merged 3 commits intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #54 +/- ##
==========================================
+ Coverage 86.17% 86.45% +0.28%
==========================================
Files 6 6
Lines 752 768 +16
==========================================
+ Hits 648 664 +16
Misses 104 104 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR implements fusion between local and global model predictions by adding a global_model_weight parameter to prediction methods. The implementation allows weighted averaging of local and global predictions, following the approach from Georganos et al. (2021).
Key Changes:
- Added
global_model_weightparameter topredict_proba()andpredict()methods - Implemented weighted averaging between local and global predictions
- Added test coverage for both classifiers and regressors
- Updated documentation with examples and added references
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| gwlearn/base.py | Core implementation of fusion logic in prediction methods |
| gwlearn/tests/test_base.py | Added tests for global weight fusion functionality |
| docs/source/predict.ipynb | Updated documentation with fusion examples |
| docs/source/references.rst | New references page |
| docs/source/_static/references.bib | Added Georganos et al. citation |
| docs/source/introduction.ipynb | Fixed typo ("furhter" → "further") |
| docs/source/index.md | Added references to toctree |
| docs/source/conf.py | Added bibtex reference style configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closes #42
Still missing tests and user guide update but this concludes the prediction functionality I wanted to have in.