Closed GordStephen closed 8 years ago
Sweet!
More progress. Added new types to support the specification of linear-constrained parameter matrices (e.g. [a b; b 2a]
) and implemented EM estimation for those constraints. Two bigger outstanding issues are 1) support for fitting parameters to deterministic processes (chapters 7-10 in the link above - eg zeros in the noise covariance matrix diagonal - right now the fitter needs to invert those matrices which is an issue) and 2) I took out time-dependent transition/observation matrix support and haven't added it back. I'll get the Julia v0.3 tests passing at some point as well.
Do you want this PR to work on Julia 0.3? I'm restricting the package to work only on Julia 0.3 for the time being and then once we have that landscape cleaned up we can move development to using Julia 0.4 only.
UPDATE: tag 0.0.3 will be the first step to Julia 0.3 isolation. Once we begin on Julia 0.4, a minor tag will be used (i.e., 0.1.0)
No, I'm fine for this to be 0.4-only.
Ok, I'm soon tagging 0.0.3, which will include support for both Julia 0.3 and Julia 0.4. We've gotten into supporting both versions of Julia too much to isolate at this point. The 0.1.0 tag will support only Julia 0.4 though, but we're still on release candidates.
Changes here were either introduced in #52 or will be in #57.
I wouldn't want to pull this yet but I though I'd let people know what I've been up to - implementing deterministic inputs to the evolution and observation equations, with appropriate EM estimation.
I added a new type called
StateSpaceModelMask
that mirrors a SSM and lets you define which of the model parameters you would want to estimate. Unfixed parameter estimation (estimate every variable possible) should be working, as should estimation with control input parameters fixed (e.g. to zeros). Initial results are encouraging relative to the current estimator - using the current fit test (on a longer generated series):Current (Nelder-Mead / Optim.jl)
EM:
And for reference, the model that originally generated the series is
So, significantly faster and better results. Yay :)
I also just found this, which lays things out explicitly and would would have saved me a lot of time on the weekend! https://cran.r-project.org/web/packages/MARSS/vignettes/EMDerivation.pdf Next step is implementing the constrained estimation techniques it describes.