-
-
Notifications
You must be signed in to change notification settings - Fork 59
Add local level example #449
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
base: main
Are you sure you want to change the base?
Add local level example #449
Conversation
Signed-off-by: Victor Garcia Reolid <[email protected]>
Signed-off-by: Victor Garcia Reolid <[email protected]>
Signed-off-by: Victor Garcia Reolid <[email protected]>
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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.
Thanks @victorgarcia98 ! Just left a few comments in Review NB. A broader question is: what do you envision this example for? Which use-cases?
Also, be careful because you also edited pymc_extras/statespace/core/statespace.py
, and it seems to be accidental as it's adding a fixed shape to parameters
View / edit / reply to this conversation on ReviewNB AlexAndorra commented on 2025-05-13T20:18:39Z Line #7. mu = np.cumsum(rng.standard_normal(size=(100,1))*np.sqrt(true_var_nu**2), axis=0) Line #8. y = mu + rng.standard_normal(size=(100,1)) * np.sqrt(true_var_eta) To follow your greek letter equations above, and since you're using the variances instead of the standard deviation, I think this should instead be: Line #7. mu = np.cumsum(rng.standard_normal(size=(100,1))*np.sqrt(true_var_eta), axis=0) # this is now eta, not nu, and not squared Line #8. y = mu + rng.standard_normal(size=(100,1)) * np.sqrt(true_var_nu) # this is now nu, not eta |
View / edit / reply to this conversation on ReviewNB AlexAndorra commented on 2025-05-13T20:18:40Z Any reason you're rebuilding from scratch and not using the structural module? |
View / edit / reply to this conversation on ReviewNB AlexAndorra commented on 2025-05-13T20:18:40Z Maybe overlay the reference value of the true params for |
To get familiar with the state space description, I wanted to implement the most simple SS model: the local level. Moreover, I show the StatsModels equivalent model next to it.