Thursday, April 23, 2015

Machine Learning : Some Interesting Use Cases

Some Interesting Use Cases (there are many many many more)...


  • Identifying the pictures of humans from their and their friends on Facebook (automatic tagging)
  • Going through videos on YouTube and identifying the cat videos
  • Self Driven Cars
  • Email SPAM detection (a pretty standard problem)
  • Handwriting recognition
  • Understanding Music Genre
  • Recommendation Engine for Netflix and Amazon
  • ...and many more
Looks Interesting !! The possibilities are endless !!

What language should be used for Machine Learning?

R vs. Python vs Matlab vs ....

Use anything you are comfortable with. The objective should not be to learn a language or learning machine learning in a standard language, but to understand the algorithm behind the solution.

There are a lot of tools (like Weka) which can run your models or packages in R or Python which take in the data and throws out the output, but make sure you understand the algorithm properly else you will not be able to tweak the model or improve its accuracy.

Open Source: R, Python, Octave
Paid: SAS, MATLAB

... plus a lot of other tools and platforms. Stick to one or two, and practice a lot.

If your aim is to go a level up, participate in Kaggle.com to know what type of problems are being solved by the top data scientists of the world. If you are just a business analyst who just ran some predictive models in R/SAS/SQL and analyzed some data, you will understand how much there is is still to learn !! 

The Need for Machine Learning

Why is it needed?


  1. Too much data, and too many things that can be done with the help of this data which is not being done currently. A great opportunity in each and every field.
  2. Machine Learning is not a subject in itself, it is always associated with some domain (inface most of the domains which have data can leverage this). Its actually 'Machine Learning for Retail' or 'Machine Learning for Media' or 'Machine Learning for Bioinformatics' or 'Machine Learning for Astronomy'. The possibilities are endless.
  3. Imagine you have an e-commerce store and 10 customers buy from you (just saying). You know what each customer is like and what they prefer to buy in your head. What if you become hugely successful and the number of customers go up to 10 Million? Also the number of products you are selling go up to 100,000. There is no way you can make use of this data without using some advanced technologies.
  4. Its not Rocket Science : Well, you are not developing a system like the Skynet or the Matrix (in that case, it is much more than Rocket Science). With dedicated effort, you can master the algorithms and use them with your own data in your own field. Most of the algorithms are not dependent on the domain (but their interpretation is). 
  5. Availability of Technology : 10 years back, if you wanted to analyze 100GB of data, you had to make a lot of investments in the tools like SAS or buying up huge amount of server space just to store the data. With the advent of OpenSource Technologies like Hadoop, Hive, Pig etc, OpenSource and free programming languages like R, Python, Octave etc and utilizing cloud technologies, you probably just need a good computer to run your Machine Learning Algorithms.
  6. Huge Scope: Data Scientist is the sexiest job of the 21st century. If you want to remain relevant in the job market, you need to learn Machine Learning to become a data scientist.
Having said all this, its not easy. A lot of effort, dedication and practice is required to master this. It seems difficult at first, then a bit easy, then insanely difficult and once you understand everything it becomes insanely easy.

Machine Learning : Supervised vs Unsupervised Learning

Machine Learning : Training computers to solve a problem without giving explicit instructions !

Everybody remembers the movie 'Terminator' and 'The Matrix'. Both movies take the idea of 'Artificial Intelligence' and show the extreme end of the spectrum. The computers in the movies (Skynet and the Matrix) somehow become so intelligent that they try to take control of the human civilization leading to a war between Man and Machine.




Ok, Lets skip the hypothetical (??) scenarios. Can computers really become so intelligent? We'll see. But there is a huge area of 'training' them to perform a task in a better and faster way than humans. And this area can be called a 'Machine Learning' or even 'Artificial Intelligence'

More Robust Definition : A computer program is said to learn from experience E with respect to some task T  and some performance measure P,  if its performance on T, as measured by P, improves with experience E.

Supervised Learning :  When the computer is provided with some data to train itself, and then it uses the training to apply the same model to a new and unseen data. Examples would include Linear and Logistic Regressions, Neural Networks, and SVMs.

Unsupervised Learning : When the computer is given the data and it applies some algorithm to understand the pattern in the data without the need of an explicit training. An example would be to give a list of data points in a 2-D plane and applying k-means clustering on the data.



There are a lot of factors, parameters and optimization that goes into the actual application and making sure the results are coming out as intended. After all, the computers are also an invention of human mind :)

An interesting example : The Cocktail Party Problem

The solution is just a one line code in MATLAB :)



Wednesday, April 22, 2015

Test Post & Disclaimer

Testing the layout and the page settings

Disclaimer: A lot of this information is from Professor. Andrew NG's awesome course in Machine Learning at Stanford, and I give full credit to him for teaching such a difficult concept in an easy way. Though I might not mention his name, a lot of material in this blog has been shamelessly lifted from his course.

If you want to do a proper course, please do this 10 week course at coursera by Prof. Andrew NG


Cheers !!!