A time series is fundamentally a sequence of observations or metrics that are recorded over a specific period of time. These observations may be recorded over hourly, weekly, monthly or yearly basis.
Introduction to forecasting
Forecasting a time series means that we want to predict what the future observations will be like over a time period based on underlying patterns of already recorded observations.
After downloading the custom visual, open the Power BI and add a New Empty Page from the bottom bar
In the Visualization tab on right, there is a ‘Import a Custom Visual Icon’. Click on it
After choosing the ‘Import from file’, browse to the directory where we previously downloaded the custom visual. Double click that file to import the custom visual
The imported custom visual icon will now show on the visualization pan. Double click this icon and the custom visual will be added to the blank page.
Resize the custom visual as required.
Now from the fields pan, drag and drop ORDERDATE column and SALES column to Time input box and Value input box in the Visualizations panel respectively. The custom visual will now be updated and will show the decomposed patterns.
Figure 1. Time Series Decomposition Visual
Introduction to time series decomposition
Time series decomposition involves decomposing a given set of observations recorded over a period of time into following patterns:
Level: This represents the average value in the series.
Trend: The increasing or decreasing value in the series. It can be linear or nonlinear.
Seasonality: The repeating short-term cycle in the series. This type of pattern is due to the seasonal elements such as the time of year or a month.
Noise: The random variation in the series.
Advantages of using time series decomposition
Time series decomposition is helpful in:
Understanding the time series by looking at the seasonal patterns and trends. For example, lower sales of gas heaters in summer does not necessarily mean that a company is performing poorly. To further evaluate these types of cases, we need to remove the seasonality pattern from the given time series
By better understand time series complexity and underlying patterns, we are in a better position to select our forecast models, tune them and further improve the forecast accuracy.
Drawback of using time series decomposition
Often times, the recorded data is not enough and fails to capture a true picture of an underlying patterns. For instance, there may be other events such as a change in weather affecting the sales of a product in an area.
To increase the prediction accuracy, we need more data and often times, gathering more data and cost and resource expensive process.
Explanation of visual from business perspective
From this custom visual, we can see that our time series data is composed of Trend, seasonality and noise(reminder). This is very helpful in business operations. For instance, we can choose to remove the seasonality aspect and focus on trend only.
Now open the Power BI and add a New Empty Page from the bottom bar
From the Visualization tab on right, click on ‘Import a Custom Visual Icon’
Choose Import from file and browse to the directory where we previously downloaded the custom visual. Double click that file to import the custom visual
After that, the imported custom visual icon will show on the visualization pan. Double click this icon and the custom visual will be added to the blank page.
Resize the custom visual as required.
Now from the fields pan, drag and drop ORDERDATE column and SALES column to Time input box and Value input box in the Visualizations panel respectively. The custom visual will now be updated and will show the decomposed patterns.
Figure 3 Forecasting using ARIMA
Introduction to ARIMA visual
ARIMA (AutoRegressive Integrated Moving Average) is a statistical method for time series forecasting. It is used to identify various standard temporal patterns in the time series data. The key aspects of ARIMA model are as follows:
AR: Autoregression. This means that the ARIMA model uses the linearly dependent relationship between an observation and its past values. It bears resemblance to linear regression model.
I: Integrated. Since ARIMA model can only be applied to stationary time series data, difference of raw observations is used to make the non-stationary time series a stationary one.
MA: Moving Average. It means that the model analyzes data points by creating a series of averages of different subsets of the lagged observations.
Advantages of using ARIMA models
ARIMA Models are used to describe autocorrelation in the dataset. Autocorrelation is correlation of an observation with its past values. It measures the similarity between a set of lagged observations as a function of time.
Drawbacks of using ARIMA models
ARIMA models are only applicable to stationary time series data. In stationary time series data, the properties do not depend on the time at which the observations were recorded. Thus, ARIMA models cannot be applied to time series with trends or with seasonality effects.
Since, ARIMA Models is basically a regression model, and the regression models works best if there is no correlation between the predicted variables.
Explanation of the visual from business perspective
From this custom visual, we can see that the green lines represent our recorded observations and the yellow line represents the forecast based on the recorded observation. From a business perspective, it can be helpful in knowing how the sales will grow in upcoming time period.
Now open the Power BI and add a New Empty Page from the bottom bar
From the Visualization tab on right, click on ‘Import a Custom Visual Icon’
Choose Import from file and browse to the directory where we previously downloaded the custom visual. Double click that file to import the custom visual
After that, the imported custom visual icon will show on the visualization pan. Double click this icon and the custom visual will be added to the blank page.
Resize it as per requirements.
Now from the fields pan, drag and drop ORDERDATE Column to Time input box and SALES Column to Value input box. The custom visual will be updated and will show the decomposed patterns.
Figure 4. Forecasting with Neural Network
Introduction to Neural Network based custom visual
In this custom visual, a single layer feed forward artificial neural network is used to learn patterns in the given data and predict the future values based on its learned parameters.
Advantages of using neural networks for forecasting
It is used for forecasting the future values based on its learned patterns in the training data. One positive side of employing neural network based forecasting model is that artificial neural network have the ability to learn the complex nonlinear patterns in the given data. This allows accurate prediction with high accuracy.
Drawbacks of using neural networks for forecasting
Like any other forecasting model, a neural network model may also suffer from paucity of data and noise present in the data. Also, a multilayer neural network can show the high variance phenomena which means that it can only make accurate predictions on the given data and perform very poorly on the unseen data. A very simple neural network (single layered, for instance) can suffer from the high bias problem, which means that the model is too simple to learn the underlying patterns in the data and thus give very low accuracy.
Explanation of visual from a business perspective
From this custom visual, we can see that the green lines represent our recorded observations and the yellow line represents the forecast based on the recorded observation. From a business perspective, it can be helpful in knowing how the sales will grow in upcoming time period.
Conclusion
Here, we implemented three custom visual. We first decomposed the given time series data to understand the effect of seasonality and trends. Then we used ARIMA and Neural Network based models for forecasting.