Machine Learning is NOT rocket science
By: Dhanesh Valappil
Tags: Artificial Intelligence, Machine Learning, Neural Networks, Data Science, AI

“Wow! machine learning? Rocket science, damn complicated..Wanna know more about it but I am not a data scientist, definitely not my cup of tea :(“

Sounds familiar? I definitely can’t blame you as most of the blogs and videos about Machine Learning portrays and illustrates it something like this:

Courtesy : aier.org

These days, Machine Learning is like sex in the school days. Every student was talking about it, only a very few know exactly what it is but only your class teacher was really doing it. Here is my humble attempt to illustrate the fundamentals of sex…sorry, I mean, machine learning in simple way that anyone can understand. So, let’s roll our sleeves up and get started. “Hello, are you still there? :)”

Conditioned Response to a Conditioned Stimulus

Let’s assume, you have a puppy. Let’s call her Mimi. As a lovely pet owner, you bought some delicious food for her (an unconditioned stimulus) and introduced it for the first time in her plate. Mimi loved it and started salivating whenever she see that food, even on TV commercials (an unconditioned response). Stage 1 is completed.

Now on stage 2, instead of feeding her food in the plate, you just created a sound with a bell(a neutral stimulus). Mimi doesn’t care a sh*t about that sound as she doesn’t really understand what the heck the bell’s sound means to her, hence no salivation(no conditioned response). Stage 2 completed. Let’s call stage 1 and stage 2 as “Before conditioning” stage of Mimi’s learning phase.

During stage 3 (during conditioning stage), you fed that delicious food in her plate and started the bell sound simultaneously. Once you train Mimi like this for a few days, the moment seeing the food and hearing bell’s sound, Mimi will get salivated(an unconditioned response). Stage 3 completed, congratulations!

During stage 4 (after conditioning), the moment you play the bell, poor Mimi will get salivated, which is a conditioned response. You win!

Courtesy: edureka!

Now let’s replace Mimi with a computer algorithm. Delicious food is Apple Inc’s past and present stock price along with various market data. The bell sound is a new product launch announcement. Based on the price and specification of the new product, current stock price, various market parameters and along with checking how stock price has reacted in the past for similar announcements, the algorithm can predict whether this is a an opportunity to buy or sell Apple Inc’s stock. This is exactly what some of the machine learning algorithms does. A conditioned response to a conditioned stimulus.

Machine learning algorithms are classified into two:

Classical Learning algorithms Reinforcement Learning algorithms

Let’s try to understand each of them by following our simple approach.

Classical Machine Learning Algorithms

Have you noticed Netflix’s recommendation on the “next videos to watch”? Have you noticed that your bank has temporarily blocked your credit card right after you swipe it at some random shop in a foreign country? Whether you love these outcomes or not, some classical learning machine learning algorithms are behind those decisions. Little bitches!

These algorithms do exist since decades. They search for a pattern and proximity in data points (numbers) and calculate vector’s direction. For that, it needs large amount of data. These algorithms our ancestors have developed were not popular during their time as there was not enough datasets available. Great ideas, wrong timing. Poor ancestors!

(That brings to another interesting topic. Regardless of the precision of machine learning algorithms you develop, you need BIG data to test and fine tune it to increase its accuracy.)

Classical Machine Learning algorithms are really simple, in fact. But interestingly, most of the machine learning algorithms you use on daily basis through your mobile apps, YouTube, Amazon, Netflix etc. etc. are based on these algorithms. Yeah, it is a classic 80–20 situation! Regardless of extremely sophisticated Machine Learning algorithms the programmers develop, this 20% segment of classical algorithms addresses 80% of day to day machine learning scenarios! Surprised?

There are a few types of Classical Machine Learning algorithms.

Supervised Machine Learning Unsupervised Machine Learning

Courtesy: vas3k.com

Supervised Machine Learning

Courtesy : US Department of Education

This algorithm is all about labeling. Let’s compare it with a kindergarten classroom:

Sam : “Teacher, is this a dog in this picture?” Teacher: “Good job Sam, Yes! It is a dog” Sam : “Teacher, how about this one? Dog?” Teacher: “Spot on again! That’s also a dog!”

Now Sam has two pictures of dog (a.k.a data samples). Next time before he ask the teacher, he will compare the new picture with those pictures labeled as dog. While Sam was keep exploring more pictures he came across a picture that doesn’t really look exactly like a dog but there are some commonalities. Little Sam is confused now.

Sam : “Teacher, is this also …a…dog?” Teacher: “Oh sweetie, I know you are confused. That one is a fox, but good try!”

Now Sam has two labelled data sets. Dogs & Fox. The more Sam explores the data, his datasets grow. The more datasets Sam has, his prediction becomes more accurate. This is exactly what a supervised machine learning algorithm do. Classifies the data, label them, use them for comparing patterns and predict the result. If the input value is X, output should be f(X). Y = f(x). That’s all the supervised algorithms do.

Let’s discuss various types of supervised machine learning algorithms in next episode.

Unsupervised Machine Learning

Assuming you have a family dog. Your young toddler knows and identifies the family dog even if no one teach the toddler that the animal is a dog. Toddler loves the dog and recognized it by observation.

One day, your friends visited you and brought their little puppy! Our toddler is seeing this dog for the first time. Seeing its 2 ears, 2 eyes and 4 legs, toddler has predicted that it is a dog! No one supervised toddler to recognize that the cute animal is a puppy!

This is exactly what unsupervised machine learning algorithms does. Had this been supervised learning, someone would have told the toddler that it’s a dog.

These algorithms are not as common as supervised learning. But still it can be used in scenarios where clustering is required. Market segmentation based on the customers and introduce suitable loyalty program is based on unsupervised algorithms.

Let’s discuss various types of unsupervised machine learning algorithms in next episode.

So that’s it guys and girls for the first episode. I really hope that now you got some idea about machine learning, classical algorithms, supervised and unsupervised algorithms. I promise you that I am not going to make you as data scientists by reading this series :) But we will dig deeper in coming episodes by our simplified approach. Stay Tuned!

Thank you for reading, cheers!