Skip to content

FIX: avoid zero division and log0 in loglike calculation - #2301

Closed
ledmonster wants to merge 1 commit into
statsmodels:masterfrom
ledmonster:fix-zero-division
Closed

ledmonster wants to merge 1 commit into
statsmodels:masterfrom
ledmonster:fix-zero-division

Conversation

@ledmonster

Copy link
Copy Markdown

In some cases, fitted value (mu) can be rounded off to 0 or 1 in Binomial GLM, and it causes zero division and log0. So added a very small number "1e-200" to them to avoid resulting NaN.

This approach is followed by following fix:

@josef-pkt

Copy link
Copy Markdown
Member

the same issue has been raised now on the mailing list
https://groups.google.com/d/msg/pystatsmodels/B4M2Jr3yPFc/gP7re5GKDwAJ

needs rebase and resolving of merge conflicts

adding temporarily prio-high as reminder

@bashtage

bashtage commented Jun 9, 2019

Copy link
Copy Markdown
Member

closing in favor of #3231

@bashtage bashtage closed this Jun 9, 2019
@josef-pkt josef-pkt added the superseded Used for PRs with content that is superseded by a newer PR label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-genmod corner-case superseded Used for PRs with content that is superseded by a newer PR type-bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants