"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "docs/_docs/diagnostics.md" between
prophet-1.1.tar.gz and prophet-1.1.1.tar.gz

About: Prophet is a tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.

diagnostics.md  (prophet-1.1):diagnostics.md  (prophet-1.1.1)
skipping to change at line 18 skipping to change at line 18
id: cross-validation id: cross-validation
- title: Parallelizing cross validation - title: Parallelizing cross validation
id: parallelizing-cross-validation id: parallelizing-cross-validation
- title: Hyperparameter tuning - title: Hyperparameter tuning
id: hyperparameter-tuning id: hyperparameter-tuning
--- ---
<a id="cross-validation"> </a> <a id="cross-validation"> </a>
### Cross validation ### Cross validation
Prophet includes functionality for time series cross validation to measure forec ast error using historical data. This is done by selecting cutoff points in the history, and for each of them fitting the model using data only up to that cutof f point. We can then compare the forecasted values to the actual values. This fi gure illustrates a simulated historical forecast on the Peyton Manning dataset, where the model was fit to a initial history of 5 years, and a forecast was made on a one year horizon. Prophet includes functionality for time series cross validation to measure forec ast error using historical data. This is done by selecting cutoff points in the history, and for each of them fitting the model using data only up to that cutof f point. We can then compare the forecasted values to the actual values. This fi gure illustrates a simulated historical forecast on the Peyton Manning dataset, where the model was fit to an initial history of 5 years, and a forecast was mad e on a one year horizon.
![png](/prophet/static/diagnostics_files/diagnostics_4_0.png) ![png](/prophet/static/diagnostics_files/diagnostics_4_0.png)
[The Prophet paper](https://peerj.com/preprints/3190.pdf) gives further descript ion of simulated historical forecasts. [The Prophet paper](https://peerj.com/preprints/3190.pdf) gives further descript ion of simulated historical forecasts.
This cross validation procedure can be done automatically for a range of histori cal cutoffs using the `cross_validation` function. We specify the forecast horiz on (`horizon`), and then optionally the size of the initial training period (`in itial`) and the spacing between cutoff dates (`period`). By default, the initial training period is set to three times the horizon, and cutoffs are made every h alf a horizon. This cross validation procedure can be done automatically for a range of histori cal cutoffs using the `cross_validation` function. We specify the forecast horiz on (`horizon`), and then optionally the size of the initial training period (`in itial`) and the spacing between cutoff dates (`period`). By default, the initial training period is set to three times the horizon, and cutoffs are made every h alf a horizon.
The output of `cross_validation` is a dataframe with the true values `y` and the out-of-sample forecast values `yhat`, at each simulated forecast date and for e ach cutoff date. In particular, a forecast is made for every observed point betw een `cutoff` and `cutoff + horizon`. This dataframe can then be used to compute error measures of `yhat` vs. `y`. The output of `cross_validation` is a dataframe with the true values `y` and the out-of-sample forecast values `yhat`, at each simulated forecast date and for e ach cutoff date. In particular, a forecast is made for every observed point betw een `cutoff` and `cutoff + horizon`. This dataframe can then be used to compute error measures of `yhat` vs. `y`.
Here we do cross-validation to assess prediction performance on a horizon of 365 days, starting with 730 days of training data in the first cutoff and then maki ng predictions every 180 days. On this 8 year time series, this corresponds to 1 1 total forecasts. Here we do cross-validation to assess prediction performance on a horizon of 365 days, starting with 730 days of training data in the first cutoff and then maki ng predictions every 180 days. On this 8 year time series, this corresponds to 1 1 total forecasts.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)