Library · Metric

RMSSE: root mean squared scaled error

RMSSE is the square root of the squared forecast error divided by the squared error of a naive forecast on the history. It rewards forecasting the mean, which is what a stock calculation needs.

By , published

Definition

The root mean squared scaled error (RMSSE) is the squared-error counterpart of MASE. The M5 accuracy competition used it to score 30,490 retail series, many of them intermittent, in a weighted form called WRMSSE.

RMSSE = √( meantest( (yt − ft)2 ) ÷ meantrain( (yt − yt−1)2 ) )

In M5 the scale is computed from the first non-zero observation of each series onward, so that the leading zeros of a product not yet on sale do not shrink it. Because the error is squared, the forecast that minimises RMSSE is the mean of the future values and not their median.

Worked example

The same intermittent series is scored with three forecasts: zero, the mean of the history, and twice the mean.

import numpy as np

train = np.array([0, 0, 3, 0, 0, 0, 2, 0, 0, 4, 0, 0])
test = np.array([0, 0, 2, 0, 3, 0])

first = np.flatnonzero(train)[0]              # M5 rule: start at the first sale
scale = np.mean(np.diff(train[first:]) ** 2)

for name, f in [("zero", 0.0), ("mean", train.mean()), ("twice the mean", 2 * train.mean())]:
    rmsse = np.sqrt(np.mean((test - f) ** 2) / scale)
    mae = np.mean(np.abs(test - f))
    print(f"forecast = {name:15s} RMSSE = {rmsse:.3f}   MAE = {mae:.3f}")

Output, produced by running the code above when this page was built:

forecast = zero            RMSSE = 0.631   MAE = 0.833
forecast = mean            RMSSE = 0.521   MAE = 1.083
forecast = twice the mean  RMSSE = 0.593   MAE = 1.333

RMSSE ranks the mean first and zero last of the three. The absolute error in the last column ranks zero first. The two measures answer different questions, and the stock question is the one RMSSE answers.

Where it misleads

  • A squared error is dominated by the few periods with a large demand. One promotion in the test window can decide the ranking of two methods.
  • RMSSE says nothing about the direction of the error. A forecast 20 % too high and one 20 % too low can have the same score and opposite consequences for stock.
  • The weighted version, WRMSSE, weights series by revenue. A method can win the weighted score while being poor on the thousands of slow items that carry little revenue.

A point measure, scaled or not, also ignores the spread of demand. A reorder point needs a quantile, scored with the pinball loss.

In our work

We report RMSSE and MASE side by side on intermittent demand, with the bias. In our second study a forecast of zero had the lowest MASE on three datasets, and never the lowest RMSSE, which is why the pair is more informative than either measure.

References

  1. Makridakis, S., Spiliotis, E., Assimakopoulos, V. (2022). M5 accuracy competition: results, findings, and conclusions. International Journal of Forecasting, 38(4), 1346-1364. doi:10.1016/j.ijforecast.2021.11.013
  2. Hyndman, R. J., Koehler, A. B. (2006). Another look at measures of forecast accuracy. International Journal of Forecasting, 22(4), 679-688. doi:10.1016/j.ijforecast.2006.03.001
  3. Chadeffaud, M. (2026). Evaluating intermittent demand forecasts: a preregistered study on four public datasets. Zenodo, preprint. doi:10.5281/zenodo.24248568

Have a question like this one on your own data? Tell us what you need in a few lines.

Send us the brief

Related pages

  • MASE: mean absolute scaled errorMASE compares the absolute error of a forecast with the error a naive forecast made on the history. Below 1, the forecast beats that naive benchmark. On series that are mostly zeros, a forecast of zero gets the best score.
  • Pinball loss (quantile loss)The pinball loss, or quantile loss, is the measure for a quantile forecast, such as the stock level that covers demand 90 % of the time. It is minimised by the true quantile and by nothing else.
  • MAE or RMSE: which forecast each one rewardsThe absolute error is smallest when the forecast is the median of what can happen, the squared error when it is the mean. On skewed data these are different numbers, so the choice of measure is a choice of forecast.
All library pages