Table 1 Evaluation metrics for regression and time series forecasting.

From: Optimizing load demand forecasting in educational buildings using quantum-inspired particle swarm optimization (QPSO) with recurrent neural networks (RNNs):a seasonal approach

Metric

Description

Formula

MAE

Average magnitude of errors

\(\:MAE\:=\:\frac{1}{n}\:\sum\:_{i=1}^{n}\left|{y}_{i}\:-\:\widehat{y}i\right|\)

MSE

Average of the squares of the errors

\(\:MSE\:=\:\frac{1}{n}\:{\sum\:}_{i=1}^{n}{\left({y}_{i}\:-\:\widehat{y}i\right)}^{2}\)

RMSE

Square root of MSE

\(\:RMSE\:\:=\sqrt{\frac{1}{n}\:{\sum\:}_{i=1}^{n}{\left({y}_{i}\:-\:{\stackrel{-}{y}}_{i}\right)}^{2}}\:\)

Proportion of variance explained by the model

\(\:{R}^{2\:=\:}1\:-\:\:\:\frac{\frac{1}{n}\:{\sum\:}_{i=1}^{n}{\left({y}_{i}\:-\:{\stackrel{-}{y}}_{i}\right)}^{2}}{\:\frac{1}{n}\:{\sum\:}_{i=1}^{n}{\left({y}_{i}\:-\:{\stackrel{-}{y}}_{i}\right)}^{2}}\)

MAPE

Forecast accuracy as a percentage

\(\:MAPE\:=\:\frac{1}{n}\:\sum\:_{i=1}^{n}\left|\frac{{y}_{i}-\:{\widehat{y}}_{i}}{{y}_{i}}\right|\:x\:100\)

sMAPE

Symmetric percentage error measure

\(\:sMAPE\:=\:\frac{1}{n}\:\sum\:_{i=1}^{n}\frac{\left|{y}_{i}-\:{\widehat{y}}_{i}\right|}{\frac{\left|{y}_{i}\right|-\:\left|{\widehat{y}}_{i}\right|}{2}}\:x\:100\)

MASE

Compare forecast error to naive forecast error

\(\:MASE\:=\:\frac{MAE}{MAE\:of\:naive\:forecast}\:\)