Repository navigation
ENH: add wls_method option, mle_settings to GLM fit IRLS - #4021
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4021 +/- ##
==========================================
+ Coverage 79.23% 79.27% +0.03%
==========================================
Files 543 544 +1
Lines 81351 81448 +97
Branches 9226 9235 +9
==========================================
+ Hits 64460 64565 +105
+ Misses 14800 14787 -13
- Partials 2091 2096 +5
Continue to review full report at Codecov.
|
|
I thought I had merged this already. |
bashtage
left a comment
There was a problem hiding this comment.
Some doc fixes would help, looks right.
| options are 'lstsq', 'pinv' and 'qr' | ||
| specifies which linear algebra function to use for the irls | ||
| optimization. Default is `lstsq` which uses the same underlying | ||
| svd based approach as 'pinv', but is faster during iterations. |
There was a problem hiding this comment.
For end users, could you explain why one would use one of the others.
There was a problem hiding this comment.
I added two sentences but no full explanation.
(AFAIK, we don't have any notes anywhere on the choice of linalg functions)
| Fits a generalized linear model for a given family using | ||
| iteratively reweighted least squares (IRLS). | ||
| """ | ||
| attach_wls = kwargs.pop('attach_wls', False) |
There was a problem hiding this comment.
Is this kwarg documented anywhere?
There was a problem hiding this comment.
No, only in the description of this PR. It's currently a private backdoor, until we have a use for it outside of unit tests.
There was a problem hiding this comment.
I added it to the Notes section, mentioning it's internal
6b631df to
94fd288
Compare
|
rebased and some addition to docstrings should be ready to merge, when green |
|
All green, after waiting in the test queue for hours. merging |
closes #4001
add
wls_methodfit optionadds
mle_settingsto results in fit_irls see comments in #2401(started out to investigate differences across linear algebra functions, but should be good to merge)
extra keyword introduced for testing
attach_wlsto attach the final WLS results to the GLMResults instance.not included in docstring
(used in unit tests, and will be useful for future development, e.g. for diagnostics.
It is doubtful whether this will be in the final API, e.g. WLS results are not available with fit_gradient.)