Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Comments

ENH: add GWGradientBoostingRegressor#57

Merged
martinfleis merged 8 commits intopysal:mainfrom
FirePheonix:GWGradientBoostingRegressor
Jan 8, 2026
Merged

ENH: add GWGradientBoostingRegressor#57
martinfleis merged 8 commits intopysal:mainfrom
FirePheonix:GWGradientBoostingRegressor

Conversation

@FirePheonix
Copy link
Contributor

Added Gradient Boosting Regressor - implemented the algorithm, it's test and also added in ipynb notebook.
For issue: #48

@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.34%. Comparing base (7ff0ca9) to head (9727135).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
gwlearn/ensemble.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #57      +/-   ##
==========================================
+ Coverage   86.51%   91.34%   +4.82%     
==========================================
  Files           6        6              
  Lines         786      797      +11     
==========================================
+ Hits          680      728      +48     
+ Misses        106       69      -37     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@martinfleis
Copy link
Member

You should fix the docstring and try to avoid that blatant local overfitting there :). Also, needs to be added to API reference.

@FirePheonix
Copy link
Contributor Author

FirePheonix commented Jan 7, 2026

yeah I was looking at exactly that right now..😅
getting the actual values on local rn.

@FirePheonix
Copy link
Contributor Author

hey @martinfleis so i tested it out on local - it highly overfits on include_focal = true , and gives R^2 values as ~0.9999999 - but the values on include_focal = false it performs poorly on the training set and shows some bad, but honest numbers.

image

And also, for the example on Random Forest Regressor - the values are also overfit and all of them give ~0.8 since it includes_focal = true by default
image

For now, I've added the actual values in this commit and testing if CI works. I'll change immediately if you say so.

@martinfleis
Copy link
Member

We don't have to show local r2 but can show pred_ instead. In any case, none of the ensemble models should include focal by default. I did set it to False for ensemble classifiers but forgot in RF regressor. Can you update that as well?

Copy link
Member

@martinfleis martinfleis left a comment

Choose a reason for hiding this comment

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

Cool! A few notes.

@FirePheonix
Copy link
Contributor Author

FirePheonix commented Jan 8, 2026

@martinfleis shall i make the pred_ changes inside the ensemble.ipynb file too and run again?

@martinfleis
Copy link
Member

No need to change anything apart from that sentence about OOB and "fails" I mentioned above. You can execute it again, yes but it gets executed automatically when building the docs anyway.

@FirePheonix
Copy link
Contributor Author

@martinfleis yes, changed.

Copy link
Member

@martinfleis martinfleis left a comment

Choose a reason for hiding this comment

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

Thanks!

@martinfleis martinfleis changed the title GWGradientBoostingRegressor ENH: add GWGradientBoostingRegressor Jan 8, 2026
@martinfleis martinfleis merged commit e535990 into pysal:main Jan 8, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants