Time Series using Holt’s Linear Exponential Smoothing (Seasonal Variation)

In this video , we explain how to implement Exponential Smoothing on Excel itself to generate a forecast.

We begin by explaining the decomposition of time series into 4 components

  • Trend (Long Term Progression of the Series)
  • Seasonality
  • Cyclic
  • Irregular/Noise

We then demonstrate the use of Moving averages and single exponential smoothing to extract the trend from the series. By subtracting trend from the original signal we can extract the seasonal variation around the trend.

Further we demonstrate the Holt’s technique for double exponential smoothing in a linear upwards trend and how we can use it for forecasting. Furthermore, by using the length of the season, we average out the seasonal fluctuation around the trend (thereby try to eliminate the irregular component) and then combine the forecasted trend and seasonal fluctuation to get an integrated forecast.

All of the above has been demonstrated using MS Excel and simple formulae, and then we proceed to demonstrate the use of IBM SPSS to do the same.

The worksheet with the implementation can be downloaded from here.

Demo on Time Series using Exponential Smoothing (IBM SPSS and Excel)

Following up on our last week’s Webex session on Logistic Regression for credit scoring (you can catch it here), this Sunday we will demonstrate the technique of exponential smoothing in time series forecasting.

More specifically, during the webinar we will take you through the basic decomposition of a time series into its components:

  • Trend
  • Seasonality
  • Cyclic
  • Error

We will concentrate on extracting and forecasting the trend and seasonality of a series. Trend component can be extracted using Exponential smoothing (Single, double and triple depending on the slope and pattern) and building a seasonal index to forecast the seasonal variation.

The webinar will demonstrate how this can be done using simple formulas on an excel sheet itself and then introduce the time series function in IBM SPSS. A basic introduction to Box-Jenkins (ARIMA) modelling will also be covered.

A trial version of IBM SPSS version 20 can be downloaded from here. (You will need to fill in some details). Those interested in attending the seminar can drop an email at info@learnanalytics.in or fill in the form at http://www.learnanalytics.in/contact.html  and we will mail you the webex invite. The webinar is scheduled on Sunday, 15th Jan, 0930 IST – 0400 GMT.

The webinar is free to attend.

To receive regular updates, please join our linkedin group Learn Analytics.

 

Installing Rattle and R

The halo around R continues to grow and grow, more and more organizations are now beginning to explore building capabilities in R programming as it can potentially deliver costs savings. More on the comparison of R and SAS in our earlier blog entry.

In this post we will take you through installation of R and Rattle on a Windows 7 machine. Here is a youtube video showing the capabilities of R on a small credit scoring dataset.

  1. Download R from the website. The link provides for Windows installation, the setup file for both 32 bit and 64 bit systems is the same, so you need not worry.
  2. The setup file is an executable, simply run it and follow the instructions, it should install the basic R software on your system.
  3. There should be an icon created on your desktop, in 64 bit systems two icons get created (one for normal 32 bit, the other for 64 bit). If you have a 64 bit system, double click on the Rx64 2.XX icon, where XX is the version number)
  4. The following window should open upR software interfacetype in the following commands one after the other, press enter after each statement   install.packages(“RGtk2″) & install.packages(“rattle”). After the first command, a window will open up asking for a CRAN mirror to be  selected as below, You can select any CRAN mirror to download the packages from (to be safe, select any US or western Europe mirror to ensure latest versions)
  5. Run the following commands now » library(rattle) followed by rattle()
  6. This is where most errors regarding rattle installation pop up, in a lot of cases R will thrown an error such as GTK not found or error with GTK+ and it will offer to download GTK for you. But even that option after download will not work. Fear not, follow the instructions below to resolve, if your Rattle window launches, congratulations, its working
  7. For those with GTK problems follow the below bullet point steps
  • 32 Bit systems open this link, 64 bit systems open this link.
  • On the page scroll down to GTK+ packages and select GTK+ Version 2.24.8 (32 bit Runtime); GTK+ Version 2.22.1 (64 bit- Binaries)
  • Copy it to the C drive root and extract the ZIP files as they are. For e.g. I create a folder C:\gtk+_2.22.1-1_win64
  • Now Right click on My Computer and then click on Properties (Alternatively you can go via Control Panel >System & Security>System), a new window will open up, on the left hand side click on “Advanced system settings”
  • A new window as below will open up

  • Click on Environment Variables near the bottom, a new window will again pop up, within the system variables selection, scroll down to path and click on edit.
  • An “Edit System Variable” window will open up with variable name “Path”, within variable values you will see a number of Folder paths separated by a semi colon.
  • Within the variable values go the beginning and add a path to the GTK folder we had extracted to the Bin folder, for e.g. C:\gtk+_2.22.1-1_win64\bin followed by a semi colon. (Note: make sure your path actually exists in the folder you have extracted into, i.e. the bin folder)
  • Close all and restart the R software
  • Type in library(rattle), press enter followed by rattle()
  • The rattle window should now open up, you are now ready to shake, rattle and roll your data. Install all packages which Rattle prompts you to, it will be done automatically after you press ok. Check out our Rattle demonstration post for a flavor of what Rattle can do.

 

Do let us know if the post was helpful in solving your Rattle installation issues, especially the pesky GTK/RGTK2 error. Feel free to comment even if you still face installation issues, we will try and solve them!

LearnAnalytics Team.

How to enter the Analytics Industry?

We have been in the field of Analytics training for over 4 years now (current and previous organization) and have trained personally over 1000 students in both SAS programming as well as advanced analytics including both retail and corporate clients.

One of the most repeated queries I field from my students is “How do I get in?” or “How do I convince an Analytics company to hire me ?” or “I have 10 years experience in so-and-so industry, how do I make a switch to Analytics?” . If only I had a rupee for everytime I was asked this question, I guess I could have retired by now! (or maybe 10 Rs/question).

Well, there is no singular answer or approach to enter the industry, off-campus freshers face a tortuous task in breaking in, to get hired you need to have experience in Analytics and to get experience in Analytics, you need to be already hired somewhere. Its an age old challenge.

Back in the day, all technical trades were controlled by guilds (for e.g. carpentry, masonry or blacksmiths) which acted both as facilitators to the chosen and entry barriers to the upstarts. To enter the field, a young man (or person) would have to grovel before an established artisan to get an unpaid apprenticeship in return for lodging and food. This was generally unpaid labor but in the bargain the apprentice gained experience and the artisan free labor. After a few years the apprentice would be granted membership of the guild and be free to setup on his own.

Jump to the 21st century and transplant this to Analytics, How do YOU break in ? The challenge a 1000 years after the establishment of guilds remains the same, to be hired you need experience under your belt and to be experienced you need to get hired.

A few clarifications for people trying to break in

  • First off, there is no formal qualification or degree required to be an Analytics professional. (You dont need fancy Maths/Stats/Engg degrees, I have seen arts graduates become Subject Matter Experts in collections analytics).
  • Secondly, there is no age limit, 40 year olds have made the jump and done extremely well.
  • Its a job seekers market, provided you have reached the magic figure of 12 months experience.

Experience in analytics is King today, people who have experience can literally dictate hiring terms.

But how to get that initial experience? Therein lies the heartbreak, though there is a way, just like it was thousands of years ago, apprenticeships (we call them internships now), you have to convince a company, any analytics company to hire you either at a very low salary or even no salary in the beginning. Face it, you need them more than they need you at this stage. Anything to get that valuable CV line about experience in. This is typically a call which freshers just out of college are able to take easily. But for those coming with previous industry experience will find difficult to make the jump. Whether to make this jump or not is a decision you have to take.

I have seen 30 year olds leave stable jobs to start in Analytics at Rs 12,000 /month salaries. A year later they are already at their previous levels. 32 year housewife who took up a SAS programming course was offered a 10,000/month contract for 3 months at a small analytics company, she is now a middle level manager in the analytics arm of a major MNC. The pattern is evident, do whatever it takes to get working once you have acquired a few skills; whether through some training courses or self study.

Analytics companies do not care about your educational qualification, formal background, if you have prior analytics experience, you are a rare commodity and you will be snapped up.

That said, what are the skills that one needs to even get a foot in the door. I have one word for that – “SAS”. SAS programming jobs are probably one of the easiest ways to get a foothold in the industry today. SAS certifications (exam costs some USD 200, quite cheap for the benefits it provides) on your CV can act as a substitute for SAS programming experience. The companies will treat you as a known commodity if you have cleared the certification exams and will increase your chances of shortlisting.(I will insert a disclaimer here – since our organization specializes in SAS training for certification, this opinion piece may be considered biased to convince the reader to enroll for SAS training, that is not the objective, I am merely stating an observation)

Secondly, there are SAS jobs and then there are SAS Analytics jobs. One mistake that people can make is to take an initially higher paying pure SAS programming job over a SAS Analytics profile. Candidates need to be very aware of the nature of work they are getting into, a company which offers work in predictive modeling or data mining using SAS should always be preferred over a pure SAS programming job. A mistake here could mean a career of reporting and ad hoc requests versus definitely more glamorous side of Predictive modeling. Beg, borrow, steal, kill or even pay, but get experience of predictive modeling under your belt. A small difference in the beginning but over 30 year career can mean totally divergent paths.

A note here: Typically startups are more likely to hire people based on attitude/aptitude rather than a CV. They provide the best opportunities for people who really want to break in.

In sum :

  • Study a lot, it takes time to master any new technical skill, typically to reach an employable skill level in SAS and basic analytics will require upto 500 hours of training, practice and self study. (Target 4 hours a day over a period of 3-4 months)
  • Be prepared to spend time in the trenches, you have to be mentally ready to take a salary cut, maybe a huge one to get that elusive experience initially. (Target internships and startups here, have a target of 8-12 months experience under your belt before you start looking around after this)
  • Make intelligent choices , in your career, even a 1 week project in predictive modeling using say regression could make all the difference.(Beware of pure SAS programming jobs, they may only be on the reporting side, keep trying to gain experience in data modeling projects)
  • Every big MNC has an analytics arm, if you are already working in such a company, pull all strings to get into an allied project which you can leverage for experience, or an internal transfer. (I know a guy who was in the BPO arm of a major MNC, he bugged his reporting chain for 1.5 years before they finally relented, today he is travelling all over the world as an SCM analytics consultant!)
  • Those who play it like they have nothing to lose are the ones who win big, bring your attitude with you
Do let us know if you found this post helpful, for any queries regarding analytics careers or analytics training drop in a mail at info@learnanalytics.in or check out our website www.learnanalytics.in
We are interested in learning how you made the jump into the analytics industry, drop us a note in the comments section for the other readers.

R-Rattle Training Video

Today, we are going to introduce a very powerful data mining tool called Rattle. Interesting feature of Rattle is that it is a GUI which sits on top of R. What it means is that it gives users a point and click interface to build data mining projects, predictive Models etc without writing a single line of R code.

In the featured video we have built various predictive models on a credit scoring dataset and compared their performances against each other using ROC curves. Models built are –>

  • Decision Trees
  • Random Forests
  • Adaptive Boosting
  • Support Vector Machines
  • Logistic Regression
  • Neural Networks

This was done without writing any R code (except to launch rattle). Total video lenght is about 17 minutes, which will take you through data import in rattle, variable exploration, model building and model evaluation using ROC’s.

This video is for people from an advanced analytics background as we have not explained much of the methodologies behind the techniques, merely how to do in Rattle. Those who can understand the methodology and are not working in the analytics industry, you should immediately jump ship, greener pastures are awaiting (Seriously, if you understand even 40% of this, you cannot be unemployed!)

For those, who want to understand and learn stuff shown on the video, check out our website www.learnanalytics.in, we specialize in Analytics Training for students worldwide. We provide SAS, R , Advanced Analytics trainings.

For doubts/queries, batch timings, drop in  a mail to info@learnanalytics.in

  1. Click here to download R
  2. Click here to download Rattle
  3. Click here to download the dataset discussed in the video

To install rattle, simply follow the instructions on the website linked above, if you have problems in installing,drop us a mail, we will be glad to help you out. We will be following up on a detailed post on R and rattle installation with troubleshooting.

Drop in comments to give us feedback!!

Learn Analytics Team