Repository navigation
BUG: Fix MNLogit summary with float values - #5854
Conversation
| issue_warning = False | ||
| msg = 'endog contains values are that not int-like. Uses string ' \ | ||
| 'representation of value.\nUse integer-valued endog to ' \ | ||
| 'suppress this warning.' |
There was a problem hiding this comment.
I'd suggest a) not putting the newline in there and letting the user's terminal handle it and b) wrapping the whole thing in parens instead of ending lines with backslashes. The latter is slightly because of personal preference, mostly because this finding this backslash usage is a decent heuristic for identifying code in need of attention.
| @@ -4052,12 +4053,23 @@ def __init__(self, model, mlefit): | |||
|
|
|||
| def _maybe_convert_ynames_int(self, ynames): | |||
| # see if they're integers | |||
There was a problem hiding this comment.
this method doesn't use self, doesn't need to be a method. could be collected with other name-standardizing utilities.
There was a problem hiding this comment.
Not going to do a major refactor to fix this one bug.
Ensure MNLogit summary works with float values closes statsmodels#3960
Codecov Report
@@ Coverage Diff @@
## master #5854 +/- ##
=========================================
+ Coverage 82.45% 82.5% +0.05%
=========================================
Files 597 597
Lines 94148 94162 +14
Branches 9667 10402 +735
=========================================
+ Hits 77626 77693 +67
+ Misses 14095 14053 -42
+ Partials 2427 2416 -11
Continue to review full report at Codecov.
|
3 similar comments
Codecov Report
@@ Coverage Diff @@
## master #5854 +/- ##
=========================================
+ Coverage 82.45% 82.5% +0.05%
=========================================
Files 597 597
Lines 94148 94162 +14
Branches 9667 10402 +735
=========================================
+ Hits 77626 77693 +67
+ Misses 14095 14053 -42
+ Partials 2427 2416 -11
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #5854 +/- ##
=========================================
+ Coverage 82.45% 82.5% +0.05%
=========================================
Files 597 597
Lines 94148 94162 +14
Branches 9667 10402 +735
=========================================
+ Hits 77626 77693 +67
+ Misses 14095 14053 -42
+ Partials 2427 2416 -11
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #5854 +/- ##
=========================================
+ Coverage 82.45% 82.5% +0.05%
=========================================
Files 597 597
Lines 94148 94162 +14
Branches 9667 10402 +735
=========================================
+ Hits 77626 77693 +67
+ Misses 14095 14053 -42
+ Partials 2427 2416 -11
Continue to review full report at Codecov.
|
|
LGTM |
Ensure MNLogit summary works with float values
closes #3960
NumPy's guide.