non-daily_data.md (prophet-0.7) | : | non-daily_data.md (prophet-1.0) | ||
---|---|---|---|---|
skipping to change at line 143 | skipping to change at line 143 | |||
m <- prophet(df, seasonality.mode = 'multiplicative', mcmc.samples = 300) | m <- prophet(df, seasonality.mode = 'multiplicative', mcmc.samples = 300) | |||
fcst <- predict(m, future) | fcst <- predict(m, future) | |||
prophet_plot_components(m, fcst) | prophet_plot_components(m, fcst) | |||
``` | ``` | |||
```python | ```python | |||
# Python | # Python | |||
m = Prophet(seasonality_mode='multiplicative', mcmc_samples=300).fit(df) | m = Prophet(seasonality_mode='multiplicative', mcmc_samples=300).fit(df) | |||
fcst = m.predict(future) | fcst = m.predict(future) | |||
fig = m.plot_components(fcst) | fig = m.plot_components(fcst) | |||
``` | ``` | |||
WARNING:pystan:403 of 600 iterations saturated the maximum tree depth of 10 (67.2 %) | WARNING:pystan:481 of 600 iterations saturated the maximum tree depth of 10 (80.2 %) | |||
WARNING:pystan:Run again with max_treedepth larger than 10 to avoid saturati on | WARNING:pystan:Run again with max_treedepth larger than 10 to avoid saturati on | |||
 |  | |||
The seasonality has low uncertainty at the start of each month where there are d ata points, but has very high posterior variance in between. When fitting Prophe t to monthly data, only make monthly forecasts, which can be done by passing the frequency into `make_future_dataframe`: | The seasonality has low uncertainty at the start of each month where there are d ata points, but has very high posterior variance in between. When fitting Prophe t to monthly data, only make monthly forecasts, which can be done by passing the frequency into `make_future_dataframe`: | |||
```R | ```R | |||
# R | # R | |||
future <- make_future_dataframe(m, periods = 120, freq = 'month') | future <- make_future_dataframe(m, periods = 120, freq = 'month') | |||
fcst <- predict(m, future) | fcst <- predict(m, future) | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |