1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/time_series.R
\name{mase}
\alias{mase}
\title{Mean Absolute Scaled Error}
\usage{
mase(actual, predicted, step_size = 1)
}
\arguments{
\item{actual}{The ground truth numeric vector ordered in time, with most recent
observation at the end of the vector.}
\item{predicted}{The predicted numeric vector ordered in time, where each element
of the vector represents a prediction for the corresponding
element of \code{actual}.}
\item{step_size}{A positive integer that specifies how many observations to look back
in time in order to compute the naive forecast. The default is
\code{1}, which means that the naive forecast for the current time
period is the actual value of the previous period.
However, if \code{actual} and \code{predictions} were quarterly
predictions over many years, letting \code{step_size = 4}, would
mean that the naive forecast for the current time period would
be the actual value from the same quarter last year. In this way,
\code{mase} can account for seasonality.}
}
\description{
\code{mase} computes the mean absolute scaled error between two numeric
vectors. This function is only intended for time series data, where
\code{actual} and \code{numeric} are numeric vectors ordered by time.
}
\examples{
actual <- c(1.1, 1.9, 3.0, 4.4, 5.0, 5.6)
predicted <- c(0.9, 1.8, 2.5, 4.5, 5.0, 6.2)
step_size <- 1
mase(actual, predicted, step_size)
}
\seealso{
\code{\link{smape}} \code{\link{mape}}
}
|