performance_metrics.Rd (prophet-0.7) | : | performance_metrics.Rd (prophet-1.0) | ||
---|---|---|---|---|
skipping to change at line 13 | skipping to change at line 13 | |||
\name{performance_metrics} | \name{performance_metrics} | |||
\alias{performance_metrics} | \alias{performance_metrics} | |||
\title{Compute performance metrics from cross-validation results.} | \title{Compute performance metrics from cross-validation results.} | |||
\usage{ | \usage{ | |||
performance_metrics(df, metrics = NULL, rolling_window = 0.1) | performance_metrics(df, metrics = NULL, rolling_window = 0.1) | |||
} | } | |||
\arguments{ | \arguments{ | |||
\item{df}{The dataframe returned by cross_validation.} | \item{df}{The dataframe returned by cross_validation.} | |||
\item{metrics}{An array of performance metrics to compute. If not provided, | \item{metrics}{An array of performance metrics to compute. If not provided, | |||
will use c('mse', 'rmse', 'mae', 'mape', 'mdape', 'coverage').} | will use c('mse', 'rmse', 'mae', 'mape', 'mdape', 'smape', 'coverage').} | |||
\item{rolling_window}{Proportion of data to use in each rolling window for | \item{rolling_window}{Proportion of data to use in each rolling window for | |||
computing the metrics. Should be in [0, 1] to average.} | computing the metrics. Should be in [0, 1] to average.} | |||
} | } | |||
\value{ | \value{ | |||
A dataframe with a column for each metric, and column 'horizon'. | A dataframe with a column for each metric, and column 'horizon'. | |||
} | } | |||
\description{ | \description{ | |||
Computes a suite of performance metrics on the output of cross-validation. | Computes a suite of performance metrics on the output of cross-validation. | |||
By default the following metrics are included: | By default the following metrics are included: | |||
'mse': mean squared error, | 'mse': mean squared error, | |||
'rmse': root mean squared error, | 'rmse': root mean squared error, | |||
'mae': mean absolute error, | 'mae': mean absolute error, | |||
'mape': mean percent error, | 'mape': mean percent error, | |||
'mdape': median percent error, | 'mdape': median percent error, | |||
'smape': symmetric mean absolute percentage error, | ||||
'coverage': coverage of the upper and lower intervals | 'coverage': coverage of the upper and lower intervals | |||
} | } | |||
\details{ | \details{ | |||
A subset of these can be specified by passing a list of names as the | A subset of these can be specified by passing a list of names as the | |||
`metrics` argument. | `metrics` argument. | |||
Metrics are calculated over a rolling window of cross validation | Metrics are calculated over a rolling window of cross validation | |||
predictions, after sorting by horizon. Averaging is first done within each | predictions, after sorting by horizon. Averaging is first done within each | |||
value of the horizon, and then across horizons as needed to reach the | value of the horizon, and then across horizons as needed to reach the | |||
window size. The size of that window (number of simulated forecast points) | window size. The size of that window (number of simulated forecast points) | |||
End of changes. 2 change blocks. | ||||
1 lines changed or deleted | 2 lines changed or added |