Skip to content

BUG: fix binary pred_table for zeros see #2968 - #3166

Merged
josef-pkt merged 1 commit into
statsmodels:masterfrom
josef-pkt:bug_discrete_pred_table
Aug 17, 2016
Merged

josef-pkt merged 1 commit into
statsmodels:masterfrom
josef-pkt:bug_discrete_pred_table

Conversation

@josef-pkt

@josef-pkt josef-pkt commented Aug 17, 2016 •

Copy link
Copy Markdown
Member

should close #2968
in discrete binary pred_table uses incorrect bins if a column is zero

I just saw that MNLogit has the same problem if a boundary column is zero
not yet fixed or looked into, unit test commented out

Note:
There is a backwards incompatible change in behavior if a probability is exactly at the threshold.
Before, the ties are treated as 0 event, now as 1 event, which is the default

After thinking, I will change this again to be consistent with MNLogit, which inherits argmax behavior which chooses the first occurrence if there is not only one max.

update

switched back to ties go to lower index
fixed MNLogit.pred_table

@josef-pkt
josef-pkt force-pushed the bug_discrete_pred_table branch from 8c98e03 to 4111586 Compare August 17, 2016 19:05
@josef-pkt

Copy link
Copy Markdown
Member Author

amended commit and force pushed

now MNLogit works

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.002%) to 89.255% when pulling 4111586 on josef-pkt:bug_discrete_pred_table into 82bc044 on statsmodels:master.

@josef-pkt
josef-pkt merged commit 1c6eff4 into statsmodels:master Aug 17, 2016
josef-pkt added a commit to josef-pkt/statsmodels that referenced this pull request Aug 19, 2016
…table

BUG: fix discrete pred_table for zeros closes statsmodels#2968
@TomAugspurger TomAugspurger mentioned this pull request Feb 2, 2017
2 tasks done
@josef-pkt
josef-pkt deleted the bug_discrete_pred_table branch June 2, 2017 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect implementation of confusion matrix in pred_table for Logit model

2 participants