-
-
Notifications
You must be signed in to change notification settings - Fork 269
TIME SERIES Add air passengers notebook #183
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
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
84594ef
to
84bd662
Compare
View / edit / reply to this conversation on ReviewNB almostmeenal commented on 2021-06-21T14:18:02Z *We could fit this using the model Prophet (would make more sense grammatically, this is a nitpick feel free to ignore) |
View / edit / reply to this conversation on ReviewNB almostmeenal commented on 2021-06-21T14:18:02Z Line #1. df.plot.scatter(x="Month", y="#Passengers", color="k"); i might be absolutely wrong, but i think pymc3 has a certain color schemes followed in the documentation or something, just check that once, maybe C1 or something is used |
View / edit / reply to this conversation on ReviewNB almostmeenal commented on 2021-06-21T14:18:03Z not sure but maybe these operations can be done in xarray |
View / edit / reply to this conversation on ReviewNB almostmeenal commented on 2021-06-21T14:18:04Z Line #21. df["Month"], _sample(linear_prior_predictive["trend"], 100).T * y_max, color="blue", alpha=0.05 again not sure, but these plots can be generated in arviz maybe, @OriolAbril would you know something about this? |
View / edit / reply to this conversation on ReviewNB almostmeenal commented on 2021-06-21T14:18:04Z Line #7. } again might be able to do this with xarray, pandas works too, but i think xarray can be a pymc model inferencedata format too so it might be useful, perhaps other people can offer more perspective |
View / edit / reply to this conversation on ReviewNB almostmeenal commented on 2021-06-21T14:18:05Z Line #13. with linear_with_seasonality: ive seen this in other examples too, maybe we dont need to call linear_with_seasonality again, pm.sample could happen directly so yeah MarcoGorelli commented on 2021-06-22T20:10:45Z I think the alternative here would be pm.sample_prior_predictive(model=linear_with_seasonality) but I think using a context manager ( |
Thanks for your review @almostmeenal ! Sure, I'll revise xarray and see where I can use it! |
I think the alternative here would be pm.sample_prior_predictive(model=linear_with_seasonality) but I think using a context manager ( View entire conversation on ReviewNB |
View / edit / reply to this conversation on ReviewNB twiecki commented on 2021-06-22T21:11:27Z don't need to set the with-context twice in a row. |
View / edit / reply to this conversation on ReviewNB twiecki commented on 2021-06-22T21:11:28Z Here I would link to the reference packages: https://github.com/MBrouns/timeseers and https://github.com/luke14free/pm-prophet (although this one seems abandoned). |
Thanks @twiecki , have updated
@almostmeenal do you know where these conventions are laid out? I didn't see anything about colours in the [jupyter style guide](https://github.com/pymc-devs/pymc3/wiki/PyMC3-Jupyter-Notebook-Style-Guide |
hi @MarcoGorelli i'm so sorry about getting back so late, so idk if there's a formal convention, but i think pymc documentation follows this consistent pattern of using |
this works!! again, this is a great and useful notebook!! thankyou for putting in all this work!!! |
View / edit / reply to this conversation on ReviewNB ricardoV94 commented on 2021-06-26T07:49:04Z About the "multiplicative seasonality": maybe explain in a couple of words. Sounds a bit jargony to me |
View / edit / reply to this conversation on ReviewNB ricardoV94 commented on 2021-06-26T07:49:05Z A couple of words about what is this "matrix of Fourier features"? |
View / edit / reply to this conversation on ReviewNB ricardoV94 commented on 2021-06-26T07:49:06Z For the last plot, you could show the time detrended data to more clearly illustrate how the seasonality variation differs between the prior and the data (and similarly for the next plot with the tighter priors) |
View / edit / reply to this conversation on ReviewNB ricardoV94 commented on 2021-06-26T07:53:02Z Show the empirircal raw percent change in the last plot, to compare with the model predictions? |
This is a good one, thanks @MarcoGorelli! |
Description
Addresses issue #xxx and aims to advance it to
There's relatively few time series notebooks, so here's one I've put together. It shows how to create a Prophet-like model for the air passengers dataset, with prior and posterior predictive checks