Repository navigation
ENH: Add initialization via keyword args to init. - #2488
Conversation
There was a problem hiding this comment.
Does initial_variance need to be an array if state is not 1-d? Or is diffusive spherical, s * eye?
There was a problem hiding this comment.
Good catch. Initial variance is spherical in the approximate diffuse case. You could make them elliptical but I can't really imagine an application for it, since the idea is that it should be "infinite" and we're just approximating infinity.
|
good/necessary to merge for 0.7. smaller inline comments (I didn't check the implementation details) Would it be better to add the new keywords explicitly to the signature instead of hiding them in kwargs? I don't remember how the init across multiple inheritance and decoupling works. I don't have an alternative, but we might want to think about combining groups of related keywords into dictionaries to shorten the signature. (I used in some cases dictionary like |
I think it would be better to leave in kwargs. They affect the way the Kalman filter runs, and in the SARIMAX case the default (which is a fully or partially stationary initialization) is almost always better. I use the diffuse case to test against Stata, but otherwise I don't think people would want to use it. |
This might be worth pursuing in terms of something like filter_kwds. I'll add a note to the decoupling PR. |
|
Issues above fixed, tests added for coverage, and rebased against master. When everything is green it should be good to merge. |
|
Thanks @ChadFulton merging |
ENH: Add initialization via keyword args to init.
Fixes #2264. Quoting from there:
Currently, the Kalman filter initialization must be performed after construction. Need to add the ability to specify it during construction via keyword argument. Four new keywords (and then class attributes) would be specified: