Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mase

Mean Absolute Scaled Error


Description

mase computes the mean absolute scaled error between two numeric vectors. This function is only intended for time series data, where actual and numeric are numeric vectors ordered by time.

Usage

mase(actual, predicted, step_size = 1)

Arguments

actual

The ground truth numeric vector ordered in time, with most recent observation at the end of the vector.

predicted

The predicted numeric vector ordered in time, where each element of the vector represents a prediction for the corresponding element of actual.

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 1, which means that the naive forecast for the current time period is the actual value of the previous period.

However, if actual and predictions were quarterly predictions over many years, letting 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, mase can account for seasonality.

See Also

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)

Metrics

Evaluation Metrics for Machine Learning

v0.1.4
BSD_3_clause + file LICENSE
Authors
Ben Hamner [aut, cph], Michael Frasco [aut, cre], Erin LeDell [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.