-
Notifications
You must be signed in to change notification settings - Fork 70
Allow multivariate components to share latent states #558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow multivariate components to share latent states #558
Conversation
cdc3712
to
8f647af
Compare
pymc_extras/statespace/models/structural/components/seasonality.py
Outdated
Show resolved
Hide resolved
pymc_extras/statespace/models/structural/components/seasonality.py
Outdated
Show resolved
Hide resolved
This is 🔥 |
@jessegrabowski, while playing around with that, I realize it's breaking I fixed it, but it'd be better if we stored the If we do that, we'd just need to make sure each component passes its |
What is noise? |
I am getting sick of this function. I'm thinking about a big refactor that would take advantage of the computational graph |
8f647af
to
f5054a3
Compare
3ec8a7a
to
940c425
Compare
940c425
to
7a8bdf1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good guys! Almost ready to merge: we need to pass the share_states
flag to the super
call in each component. I'll add that, and fix the merge conflict
Why? |
Also please rebase instead of merging |
pymc_extras/statespace/models/structural/components/measurement_error.py
Show resolved
Hide resolved
Because I need it here, in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good now!
This PR allows multivariate components to share latent states between observed states. For example, if we want two states to have a shared component and an idiosyncratic component, as in:
This can be accomplished as follows:
This will require a refactor for each component to add the
shared_states
argument. Here's the TODO list: