| 123456789101112131415161718192021222324252627282930313233343536 |
- % Generated by roxygen2: do not edit by hand
- % Please edit documentation in R/diagnostics.R
- \name{cross_validation}
- \alias{cross_validation}
- \title{Cross-validation for time series.
- Computes forecast error with cutoffs at the specified period. When the
- period is the time interval of the data, is the procedure described in
- https://robjhyndman.com/hyndsight/tscv/. Beginning from end-horizon, makes
- a cutoff every "period" amount of time, going back to "initial".}
- \usage{
- cross_validation(model, horizon, units, period, initial = NULL)
- }
- \arguments{
- \item{model}{Fitted Prophet model.}
- \item{horizon}{Integer size of the horizon}
- \item{units}{String unit of the horizon, e.g., "days", "secs".}
- \item{period}{Integer amount of time between cutoff dates. Same units as
- horizon.}
- \item{initial}{Integer size of the first training period. If not provided,
- 3 * horizon is used. Same units as horizon.}
- }
- \value{
- A dataframe with the forecast, actual value, and cutoff date.
- }
- \description{
- Cross-validation for time series.
- Computes forecast error with cutoffs at the specified period. When the
- period is the time interval of the data, is the procedure described in
- https://robjhyndman.com/hyndsight/tscv/. Beginning from end-horizon, makes
- a cutoff every "period" amount of time, going back to "initial".
- }
|