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
It looks like we are adding or copying many fit functions just because they need to choose the results class. In some cases they also have special code to calculate start_params.
Two possibilities
register return class in a module global, as alternative it could be another attribute
add method for start_params()
similar use case:
currently it's not possible to subclass the results class without also subclasses the model and overwriting fit,
example: least squares (WLS) with predefined scale, scipy curve_fit discussion, and Stata's vwls which would need to redefine results.scale
(I just realized that I could pick this up as option for cov_type)
(while looking at the missing NegativeBinomial.fit_regularized #1454)
Yes, this was part of the refactor that moved these into types of discrete choice models since the return classes have a lot of model-specific code.
I'm +1 on a _start_params method. I'd be +.5 on some magic to specify the return class, but it sounds like more trouble than it's going to be worth IMO. Would make things significantly more complicated.
Activity
CLN L1NegativeBinomialResults rename closes statsmodels#1615,
josef-pkt commentedon May 30, 2014
I'm running into this again for adding another fit_method (
fit_constrained)example Logit.fit
and Poisson.fit
The only difference is in the Results and ResultsWrapper classes
jseabold commentedon May 30, 2014
Yes, this was part of the refactor that moved these into types of discrete choice models since the return classes have a lot of model-specific code.
I'm +1 on a
_start_paramsmethod. I'd be +.5 on some magic to specify the return class, but it sounds like more trouble than it's going to be worth IMO. Would make things significantly more complicated.CLN L1NegativeBinomialResults rename closes statsmodels#1615,
CLN L1NegativeBinomialResults rename closes statsmodels#1615,
Merge commit 'v0.5.0-1189-g48f7a21' into releases
Merge branch 'releases' into debian-experimental