You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] TweedieGLM never passes alpha to TweedieRegressor #1584
Yes, this bug occurs on the latest version (main at 0e5a7a9: chainladder 0.10.1, Python 3.12.15, numpy 2.3.3, pandas 2.3.3, scikit-learn 1.7.2).
Describe the bug in words
TweedieGLM stores alpha (glm.py L208) but builds its TweedieRegressor without it (L227–L235), so every fit uses scikit-learn's default penalty of 1.0. alpha=0 therefore doesn't give the unpenalized GLM the docstring describes (L64–L68): on ukmotor its IBNR comes out 4.2% above chain ladder. No commit in the history has passed alpha.
With alpha=self.alpha passed, both asserts pass and the repro prints 0, 28655.8 and 28655.8. I have that one-line change locally with a regression test in test_glm.py. The default stays 1.0, so fits that don't set alpha are unchanged.
Would you be willing to contribute this ticket?
Yes, absolutely!
Yes, but I would like some help.
No.
(This issue was written with Árbol, an AI assistant, under my direction.)
Activity