In continuation to my earlier post, I’m trying to explore ARIMA using an Example. In this post we will go into each step in detail how we can accomplish ARIMA based forecasting for a problem.
Step 1: Problem Identification or Our Scenario
We are going to consider the past history of time series data on the Household Power consumption and use that data to forecast using ARIMA. There is also a research paper published in Proceedings of the International MultiConference of Engineers and Computer Scientists 2013 Vol I, on the same dataset analysing the performance between ARMA and ARIMA. Our post will focus on step by step accomplishing forecast using R on the same dataset for ease of use for Beginners. Sooner or later we will evaluate tools such as AutoBox, R which can be used for solving this problems.
Step 2: Data Gathering or Identification of dataset
The dataset we are going to use would be a dataset on Individual household electric power consumption available in UCI Repository under the URL: https://archive.ics.uci.edu/ml/datasets/Individual+household+electric+power+consumption. This dataset is a multivariate dataset. Please check this link to understand the difference between univariate, bivariate and multivariate.
Quick Summary of the Dataset:
You can open this semicolon delimited text file in Excel and make the necessary steps on the wizard you will be having an excel sheet with the data as given below. I was able to load rows only up to 1048576. The actual total number of rows in the text file is 2075260. Whoa..
Next to do the Step 3: preliminary analysis we can use R as a tool. For using R as a tool we need to load this data into R and for analysing it. For this I can save this excel sheet in CSV format or in XLS format and the import into R as outlined in my other post or using this link. I’m using RStudio for the purpose and demonstrating the data loading process in the screenshots in the subsequent sections.
First the installation had shown some error, after that in the subsequent attempt the installation of gdata was successful. Now we can load the library using the command library(gdata). After we which we have loaded powerData variable with the data available in the CSV file for further analysis and we can view the data using View. Please check the console window for the code.
In the next post we will do some preliminary analysis on this data which we have loaded.
Word “ARIMA” in Tamil language the means Lion.
Everybody is curious and anxious enough to know what the future holds? It’s always exciting to know about it. Though there are various forecasting models available in this post we will look at ARIMA. Welcome to the world of Forecasting with ARIMA.
What is ARIMA?
ARIMA is a forecasting technique. ARIMA– Auto Regressive Integrated Moving Average the key tool in Time Series Analysis. This link from Penn State University gives good introduction on the time series fundamentals.
What is the purpose?
To Forecast. The book Forecasting: principles and practice gives a very good understanding to the whole subject. You can read it online.
What kind of business problems it can solve?
To give examples the following are some of the use cases of ARIMA.
- Forecast revenue
- Forecast whether to buy a new asset or not
- Forecast of currency exchange rates
- Forecast consumption of energy or utilities
What is mandate to get started?
- It is very important to have clarity on what to forecast. Example if you want to forecast revenue whether it is for a product line, demography, etc., has to be analysed before venturing on to the actual task.
- Period or the horizon in which the forecast is to be done is also crucial. Example: Monthly, Quarterly, Half-yearly etc.,
What are the preferred pre-requisites on data for Time series forecasting?
Updated after comment from tomdireill:
- Data should be part of time series. That is data which is observed sequentially over time.
- It can be seasonal. Means it should have highs and lows. As per the notes from Duke University it can be also applied on flat pattern less data too.
- It should have trend of increasing or decreasing
can be handled as outlined here http://www.unc.edu/~jbhill/tsay.pdf
Ok, Now we got to understand what is essential to get started on forecasting, before we devolve lets work on the steps.
5 Steps towards forecasting:
In the next post we will take up an example and work on the above steps one by one. Keep waiting.
Recently during my interaction with one of our colleagues there came a discussion about using the same database replicated or making available across multiple locations. In the advent of various connectivity options exists these days and when people are talking about cloud based apps and implementation why is this need. This post is a search of an answer for that.
Business needs for multi-location enterprise solutions:
- Requires using one application across the enterprise to ensure data integrity and single version of truth.
- Get to know the data of what’s happens in other locations or other manufacturing or outlets.
- Helps to plan and react better based on the data insights available from other locations.
- Process control and improvement across the enterprise with a single solution
- Low training cost
Challenges in accomplishing these business needs:
- Lack of connectivity or poor connectivity between the locations
- Higher bandwidth costs or complex internet solutions required to support the enterprise needs
- No control or process enablement in the locations or facilities
- Enterprise applications does not support the scenarios of multi-location with better control on data and process
- Processes and applications established at locations without understanding the impact of connectivity and process issues
- Limited accountability and responsibility at the locations in comparison with corporate or head quarters
Solutions or options are available for us:
- If we are very sure about the connectivity and availability we can adopt cloud based solution which resolves problems for once for all
- When there is connectivity issues, we might need to resort to Database synchronization options which would be more feasible to manage enterprise applications
The key things to these kind of scenarios is to identify the following with respect to data:
- Who is the data owner?
- Who has to create it?
- Where it has to be created?
- Who is going to consume it?
- Is it required real-time?
- What controls to be established upon the data?
Related articles for more reading: