Repository navigation
ENH: state space: more flexible return options in MLEModel.fit - #3513
ChadFulton wants to merge 2 commits into
Conversation
|
I also plan to merge this PR quickly if green, seems pretty innocuous. But as always, I can wait if there are concerns. |
|
The main question is consistency of the keyword across models. We will need consistency across models when we start to add bootstrap or similar generic methods that should apply to hopefully all models. so the API change is not completely innocuous |
Sure, not completely innocuous. Something to be discussed? Are you concerned about the keyword name, or the argument type (e.g. strings here)? From a quick search across all the |
|
I haven't thought much about it yet. I just wanted to signal that this needs some discussion or thought. I think switching to a string makes sense. |
|
In some of the hypothesis test we use All this is still a bit of a grey zone, but we should work on establishing a consistent API for these extra choices for the returns. |
|
Okay, sounds good, I'll let this PR rest for a while. I'm happy with I think the reason for this PR is aligned with your concern, in that (This came up for me in designing a subclass, where I wanted the |
|
I was hoping we could revisit this PR. To summarize, the main idea is that there may be different types of output possible from a In state space models, we would have the following options:
Code-wise the change is pretty trivial, but the issue is that this may set a precedent for future API. I like @josef-pkt's idea of a verb, like |
|
Mainly as general considerations We need a generic keyword across models that should have at least the default full Results instance and as second option to return just Beside bootstrapping params we also had a use case of just requiring Something like Another design alternative, if you return a results instance is to trigger the extra computation in a lazy way from the results instance. That's our main pattern, but I don't know if that would work here. It also doesn't work well for some other Results options like |
|
I'm now thinking also in hypothesis test about 3 cases for |
|
@ChadFulton Does this PR still have any value? statespace has moved so far I suspect no. |
|
I agree, thanks for the nudge to get this closed @bashtage |
Deprecates the
return_paramsargument toMLEModel.fitand adds a new argumentresultswhich can beparams,mlefit,filter, orsmooth. Previously, it always returned smoothed results unlessreturn_params=Truein which is just returned a vector of parameters. Sometimes we may want a middle ground.