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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Incorrect use of partial in
TweedieDistribution._rowwise_gradient_hessian
#889Fix: Incorrect use of partial in
TweedieDistribution._rowwise_gradient_hessian
#889Changes from all commits
2d71452
b0ab7e4
644cc16
00408d9
36a5916
a2dde9e
797f0b1
27b123d
dd2a6c3
6f18433
b67feb4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, what happens if you use the full Hessian? Do the tests pass? Are the coefficients closer to
glmnet
's?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The glmnet test passes and the coefficients are roughly as close as in the other case. Another test (
tests/glm/test_glm.py::test_glm_family_argument[inverse.gaussian-fam4]
) fails with a singular matrixLinalgError
, though.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The failing test might not be an issue though as I believe the model was originally meant to be penalized, which but it is not since glum v3. 🤔 Anyways, I think it needs a bit more thinking and testing if we want to go with the true Hessian. I'd vote for merging this fix relatively soon, and possibly switching to the true Hessian later on if we convince ourselves that it works.