Repository navigation
BUG/ENH: summary2, try param_names before exog_names - #4505
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4505 +/- ##
==========================================
+ Coverage 80.14% 80.15% +0.01%
==========================================
Files 560 560
Lines 84613 84632 +19
Branches 9572 9572
==========================================
+ Hits 67810 67840 +30
+ Misses 14587 14580 -7
+ Partials 2216 2212 -4
Continue to review full report at Codecov.
|
|
travis is green, but some python took much longer. |
4c70da4 to
94098c4
Compare
|
The python on travis that are slow before are around 10 minutes faster again (roughly 26 instead of 36). |
| try: | ||
| data.index = results.model.data.param_names | ||
| except AttributeError: | ||
| data.index = results.model.exog_names |
There was a problem hiding this comment.
Seems reasonable. Are there cases where param_names wont be right? (i.e. is the try/except even necessary?
There was a problem hiding this comment.
try except was necessary because without it 3324 had a test error in MICE.
A proper solution needs to wait. I could have added a quickfix in MICE instead but overall this needs more thinking about the design.
| # hard coded simulated y | ||
| # ids = np.asarray(ids) | ||
| # np.random.seed(123987) | ||
| # y = x + np.array([-1, 0, 1])[ids - 1] + 2 * np.random.randn(len(y)) |
There was a problem hiding this comment.
IIUC the code above is equivalent to the code below? why bother with hard-coding below?
There was a problem hiding this comment.
minor speedup, and I needed to fix the case because for most seeds the optimization didn't converge properly (or ended up at corner or non-invertible hessian.)
closes #3324
This is trying a quickfix for summary2 to use param_names. It's similar to #3324 except for a try except protection.
summary_col doesn't work with MixedLM which uses summary2 for
summary()Note:
summaryalso only uses model.exog_names, which I don't change here.Bigger issue (not now) settle the param_names/exog_names pattern, #4426