- Time Series Tutorial
- Time Series - Home
- Time Series - Introduction
- Time Series - Programming Languages
- Time Series - Python Libraries
- Data Processing & Visualization
- Time Series - Modeling
- Time Series - Parameter Calibration
- Time Series - Naive Methods
- Time Series - Auto Regression
- Time Series - Moving Average
- Time Series - ARIMA
- Time Series - Variations of ARIMA
- Time Series - Exponential Smoothing
- Time Series - Walk Forward Validation
- Time Series - Prophet Model
- Time Series - LSTM Model
- Time Series - Error Metrics
- Time Series - Applications
- Time Series - Further Scope
- Time Series Useful Resources
- Time Series - Quick Guide
- Time Series - Useful Resources
- Time Series - Discussion

It is important for us to quantify the performance of a model to use it as a feedback and comparison. In this tutorial we have used one of the most popular error metric root mean squared error. There are various other error metrics available. This chapter discusses them in brief.

It is the average of square of difference between the predicted values and true values. Sklearn provides it as a function. It has the same units as the true and predicted values squared and is always positive.

**MSE=1/n ∑ _(t=1)^n▒〖〖(y〗_t^'-y_t)〗^2**

Where y_t^' is the predicted value,

y_t is the actual value, and

n is the total number of values in test set.

It is clear from the equation that MSE is more penalizing for larger errors, or the outliers.

It is the square root of the mean square error. It is also always positive and is in the range of the data.

**RMSE=√(1/n ∑ _(t=1)^n▒〖〖(y〗_t^'-y_t)〗^2 )**

Where, y_t^' is predicted value

y_t is actual value, and

n is total number of values in test set.

It is in the power of unity and hence is more interpretable as compared to MSE. RMSE is also more penalizing for larger errors. We have used RMSE metric in our tutorial.

It is the average of absolute difference between predicted values and true values. It has the same units as predicted and true value and is always positive.

**MAE=1/n ∑ _(t=1)^(t=n)▒〖〖|y〗_t^'- y_t |〗**

Where, y_t^' is predicted value,

y_t is actual value, and

n is total number of values in test set.

It is the percentage of average of absolute difference between predicted values and true values, divided by the true value.

**MAPE=1/n ∑ _(t=1)^n▒(y_t^'- y_t)/y_t *100 %**

Where, y_t^' is predicted value,

y_t is actual value and n is total number of values in test set.

However, the disadvantage of using this error is that the positive error and negative errors can offset each other. Hence mean absolute percentage error is used.

It is the percentage of average of absolute difference between predicted values and true values, divided by the true value.

**MAPE=1/n ∑ _(t=1)^n▒(〖|y〗_t^'- y_t |)/y_t *100 %**

Where y_t^' is predicted value

y_t is actual value, and

n is total number of values in test set.

Advertisements