Skip to content
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

Hurricane Path Forecasts using HSGP and Vector Auto Regression #715

Open
Dekermanjian opened this issue Oct 26, 2024 · 4 comments
Open

Hurricane Path Forecasts using HSGP and Vector Auto Regression #715

Dekermanjian opened this issue Oct 26, 2024 · 4 comments
Labels
proposal New notebook proposal still up for discussion

Comments

@Dekermanjian
Copy link
Contributor

Notebook proposal

Title: Hurricane Path Forecasts

Why should this notebook be added to pymc-examples?

I think this would be an interesting example to have because of the following:

  • This model is a multi-output estimation (distance + direction) problem
  • It is a relevant topic with real world implications that are currently newsworthy
  • It shows how one can apply/extend the very cool work depicted in example_1 by @NathanielF and in example_2 by @ricardoV94

Suggested categories:

  • Level: Beginner/Intermediate

Related notebooks

Links to related notebooks mentioned above.

References

references in notebooks above + any other if relevant at completion of example.

Preliminary work

I have a good chunk of the work complete but it is still a work in progress. I am trying to gauge if this will be of interest to the PYMC community. here is a link to what I have so far.

@Dekermanjian Dekermanjian added the proposal New notebook proposal still up for discussion label Oct 26, 2024
@NathanielF
Copy link
Contributor

Sounds super! Would love to see it.

One thing to note perhaps is that @jessegrabowski has improved on the PyMC implementation of VAR models with a nice api and wrapper in pymc-experimental.

Just flagging in case you hadn't seen it, but it would be interesting if you can leverage any of his work there: https://discourse.pymc.io/t/webinar-time-series-analysis-with-bayesian-state-space-models-in-pymc-aug-26-4-00-pm-utc/14937

That said, it looks like you're aiming at a complex hierarchical structure which might not fall neatly into to the pymc-experimental API. @jessegrabowski can you comment on that?

In any case @Dekermanjian, it would be great to see this use-case developed!

@jessegrabowski
Copy link
Member

jessegrabowski commented Oct 26, 2024

Arbitrary prior specifications are allowed in statespace, as long as the final system of equations that describes the kinematics of the system is linear, and the prediction errors are Guassian. I only glanced at the notebook, but I didn't see anything that wouldn't fit.

@Dekermanjian
Copy link
Contributor Author

Thank you, @NathanielF! I am glad that this is something that others are interested in!

@jessegrabowski The statespace work you've done is really cool! I am going to watch through the webinar recording and go through the notebooks to adapt what I currently have to utilize the api you've built.

@Dekermanjian
Copy link
Contributor Author

Dekermanjian commented Nov 6, 2024

Hey @jessegrabowski I am so sorry to bother you but I ran into a bit of a road block while trying to adapt the VARMAX model using the State Space API.

At this point I am trying to integrate the 2-dimensional GP that is meant to capture spatial information into the Kalman Filter process. I am stuck with trying to go from defining $S(x)$ to defining $S(X_{t-1})$ so that I can add the spatial information as a covariate in the estimation of the current state_matrix:
$$x_{t} = A_{t-1}x_{t-1} + S(x_{t-1}) + c_{t} + R_{t}\epsilon_{t}$$

Is there a way I can get a new variable to be apart of the (I am assuming) pytensor.scan function that computes the Kalman Filter steps?

PS: If I am completely off base here I wholeheartedly apologize. I only learned of Kalman Filters when I started looking into the State Space API.

I also updated the notebook here, at the very bottom you can see my attempt at using the State Space API.

Edit:
Okay, I added the GPs to the state matrix in the initialization of the ssm and then passed in the GP variables into the Kalman Filter by concatenating it to the data. I don't know if this will pose any issues, obviously it is not a clean way to do it. I updated the notebook in the link above to reflect this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal New notebook proposal still up for discussion
Projects
None yet
Development

No branches or pull requests

3 participants