You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ENH/BUG: GLM fit_irls does not have a method option #4001
edit
Currently lstsq and pinv have the same behavior, therefore no backwards incompatible change. Trying an example with near collinearity around the threshold, both lstsq and pinv show exactly the same cross-over between regularized and unregularized solution.
Adding the method argument is therefore an ENH not BUG <end edit>
also breaks backwards compatibility in corner cases
related #3994 is changing rcond for lstsq which is now the default for irls
I'm using example from #3257 with offset which raises exception SVD not converged in lstsq, and I cannot switch back to "pinv" to compare LinAlgError: SVD did not converge in Linear Least Squares
suggested name for irls keyword kwarg option wls_method
maybe misleading,
This is similar to EIM option in the fit_gradient method in that it is only for the optimization. The current irls in GLM calls WLS at the end independently of the MinimalWLS method used in the irls loop.
(I just checked, all current MinimalWLS methods use the decomposition of exog, and none uses the product matrix directly x.T dot x)
possible change: make wls_method also apply to the final WLS call (which does not yet have lstsq as option).
Another option would be to add rcond, which we don't expose anywhere, AFAIK. (But we can leave that open until we know how to resolve #3994 and #2628)
If difference pinv and lstsq is minor (they essentially use the same general SVD based approach, AFAIR), then this is a minor issue. (but we still need method option for testing)
minor aside: scale is not recomputed after the final WLS call
Activity
josef-pkt commentedon Oct 9, 2017
josef-pkt commentedon Oct 10, 2017
suggested name for irls keyword kwarg option
wls_methodmaybe misleading,
This is similar to EIM option in the fit_gradient method in that it is only for the optimization. The current irls in GLM calls WLS at the end independently of the MinimalWLS method used in the irls loop.
(I just checked, all current MinimalWLS methods use the decomposition of exog, and none uses the product matrix directly x.T dot x)
possible change: make wls_method also apply to the final WLS call (which does not yet have lstsq as option).
Another option would be to add
rcond, which we don't expose anywhere, AFAIK. (But we can leave that open until we know how to resolve #3994 and #2628)If difference pinv and lstsq is minor (they essentially use the same general SVD based approach, AFAIR), then this is a minor issue. (but we still need method option for testing)
minor aside: scale is not recomputed after the final WLS call
[-]BUG: GLM fit_irls does not have a method option[/-][+]ENH/BUG: GLM fit_irls does not have a method option[/+]ENH: add wls_method option, mle_settings to GLM fit IRLS, closes stat…
ENH: add wls_method option, mle_settings to GLM fit IRLS, closes stat…
ENH: add wls_method option, mle_settings to GLM fit IRLS, closes stat…