Skip to content
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

Request for a force_finite flag for score function #564

Open
thobanster opened this issue Jul 13, 2022 · 1 comment
Open

Request for a force_finite flag for score function #564

thobanster opened this issue Jul 13, 2022 · 1 comment

Comments

@thobanster
Copy link

The r2_score method in sklearn has a force_finite flag which defaults to True in order to avoid infinite and NaN values when the TSS happens to be 0. The analogous quantity when computing D^2 is the null deviance, which can also sometimes be 0. It would be great if, in glum, there was also a force_finite flag that can gracefully handle the case where the null deviance happens to be 0. Right now, I get a ZeroDivisionError in glum 2.1.2 running in Python 3.6.

@lbittarello
Copy link
Member

Very late to the game, but: Why do we use a pseudo-R² as the score at all? Couldn't we just report the negative or inverse deviance? For tuning purposes, it shouldn't change the ranking of parametrisations. @MarcAntoineSchmidtQC @jtilly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants