Behold! This blog post is exclusively for readers who don’t know the ABC of Machine Learning and feel left out when they see people talking about this hottest technology trend. We assure you that you will have enough understanding after reading this blog about the latest buzzword floating around (machine learning) to actively participate in casual talks even if you do not hail from a TECH background.
“If you can’t explain it simply, you don’t understand well enough” — said Dr. Albert Einstein
You know Steve Jobs was famous for his wonderful way of explaining concepts, simple and straight. I bet if you would invite an alien into his presentation, even he would understand what it’s all about. The goal of this article is to bring in a similar type of engagement and likability (the art of simplicity) within the machine learning realm.
Before we get started, let me be honest. You cannot really learn everything about machine learning in 5 minutes or 5 days. It takes a lot of effort, time and practice but what you will learn in 5 minutes from this blog is -what machine learning is, the different types of machine learning, its applications, and few other important terms related to machine learning. If you’re still interested to learn in-depth about machine learning and its practical applications, Springboard’s career coach can point you to mentored machine learning courses, books, and videos that will make you a machine learning expert. Sounds good? Let’s begin…Start the clock…
Understanding Machine Learning
Let me ask you a small puzzle –
Did you answer 36? Why not 49 or 64 or any other number or a letter from the alphabet? This is because you figured out that in the first four pairs of numbers, the second number is the square of the first number. You learned from your experience.
This is the kind of behavior we are trying to teach machines i.e. to “Learn from Experience.” The machine processes the given input data (in this case, the first four number pairs) and for any new data that it receives (the fifth pair) it should learn from experience and predict the outcome based on the input data. In this case, our input data was just numeric but it can be anything text, videos, audio, images, etc.
Machine learning is in no way different from the way humans learn. Humans learn from their mistakes (gather data inputs), change actions accordingly (tune the machine learning model), and proceed with the task(re-run the model).
Let us understand it with a simple example. It is just like how babies learn to walk. Every time a little one falls, he/she learns unknowingly and realizes that legs need to be straight while walking and not in a bent position. The next time again when they fall, they feel the pain and cry. However, they have learned not to stand in a bent position again and then they try harder. They look for support from the wall, chair, door or any other object near them that can provide support and help them stand still. This is how machines learn and develop intuition from their environment.
Still wondering on how machine learning actually works?
Let us suppose you want to give a reward ( in the form of a chocolate, ice-cream, toy, serving them their favourite meal, or anything else that they like) when a kid does something good, like washing hands after coming from school, greeting people, making up their bed, cleaning dirty dishes, for getting good grades or anything good, how do you do it? Let us say you decide to write a program called “Rewards Program”. Easy right? Just write a program in any language Java or C++ with a couple of if conditions. But, do you think all parents in the world have the same reasons to give a reward? Definitely, NO. Each parent has their own unique reason to reward their child. There would be a million different reasons.
In this scenario where you have constantly changing conditions (reasons to reward a child) rather than writing a program with if conditions on when to reward a child, you feed in all the data you have collected (conditions that result in rewarding a child) and the machine would learn when to reward a child. The more data you feed about the tasks that resulted in a reward, the more accurate the algorithms would become over time.
Isn’t this machine learning? Definitely, yes. A machine can observe the phenomena and refine itself to take decisions on when to reward a child.
Formal Introduction to Machine Learning
Arthur Samuel in 1959 coined the term Machine learning and described it as: “the field of study that gives computers the ability to learn without being explicitly programmed.” This is an older, informal definition.
A well-posed modern definition of machine learning given by Tom Mitchell, Carnegie Mellon University
“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.”
Don’t get scared off with the definition of terms T, P, and E. They are very useful and I will explain it to you with a simple example. Say , you want your program to predict traffic trends at a busy road (This is your task T), you can run a machine learning algorithm with previous data about traffic trends at the busy intersection (This is your experience E) and, if the algorithm has learned successfully, it will predict future traffic trends in a better way (This is the performance measure P).
Still confused ??? Let’s take another example to understand the definition in a better way. Say, you want to predict the price of a 3 BHK in the city of dreams, Mumbai. You feed millions of data points to the program that include -neighbourhood localities, 3 BHK housing prices across different localities, cost per sq. feet on a yearly basis, and more.
In this example,
- Task T is predicting the price of a 3 BHK
- The experience E is the million data points, you input to the program.
- The performance measure P is the difference between the predicted value by the program and the actual value quoted by the builder. The lesser the difference, the more accurate is the housing price prediction algorithm.
The goal of machine learning is not to make a perfect prediction but to make guesses or predictions that are good and meaningful enough.
Types of Machine Learning
As I already mentioned machines learn just the way humans learn. A machine can learn in 3 ways –
- Observing what others did in a similar situation -Supervised Machine Learning.
- Observing a situation and deriving the best possible outcome on the spot – Unsupervised Machine Learning
- Observing the mistakes or success and learning the best actions -Reinforcement Machine Learning.
Supervised learning is where there are input variables (X) and an output variable (Y) and the algorithms learn the mapping function from X to Y so that whenever there is any new input data (X) it can predict the outcome variable Y with maximum accuracy.
It is known as supervised learning for the reason that the algorithm learns from the dataset which relates to a teacher supervising the learning. In supervised learning both input data and desired outcome is given to the algorithm i.e. the training data includes expected answers. Both input and output data are labeled for classification that provides a learning base for any future data processing. The goal of supervised learning is to perform a task as well as humans (well-defined task T) based on the training data provided by humans (experience E) with error/accuracy as a performance measure P on that task.
Say, for example, you have several images with information about what is on them and then you train the model to recognize any new image. The best real-time example of supervised learning is that of Google Photos. The algorithm is fed with millions of images of a person X and then for any new human image, the algorithm identifies if it belongs to person X or not.
All supervised learning techniques are either classification problems or regression problems.
Classification – If the output variable (Y) is a category( like WIN or LOSS, SPAM or NON-SPAM, POSITIVE, NEGATIVE or NEUTRAL ) then it is a classification problem.
Regression – If the output variable (Y) is a real value (predicting the age of a person, predicting stock prices) then it is a regression problem. The puzzle that we saw at the beginning of the article was an example of Supervised Learning -Regression technique.
Imagine that you have never seen a cricket match before. You, by chance, happen to watch a T20 video on the internet, now you start classifying players in the video based on various criteria – People wearing same colored dress are in one class, on the basis of their playing hand RH vs LH, people of one style are in one class like fielders, batsmen, bowlers or whatever be the criterion you observe and classify. This is unsupervised learning.
In unsupervised learning, the algorithm learns from input data (X) without being given any correct outcomes (it does not have a corresponding output variable Y). The algorithm self-improves itself based on huge and diverse datasets by learning from the unlabelled data to differentiating the given input data. The goal of unsupervised learning is to find some kind of structure in the data for a vaguely defined task (T) with no experience (E) and no performance measure (P), though there are a few evaluation metrics. All unsupervised learning problems can further be classified as Clustering or Association problems.
Association- In this kind of a learning problem the algorithm discovers rules which describe a large portion of the data something like “People who buy a Laptop also tend to buy a Laptop Table.”
Clustering – The algorithm discovers inherent groupings in the data based on similarities. The best application for this is market segmentation where retailers create different customer groups based on their purchase history.
The third type of learning is Reinforcement learning that learns based on the interaction with the environment which begins with making random decisions and then learns based on the errors/successes it encounters as it proceeds. Computer played board games like Chess, Go , self-driving cars, robotic hands are examples of reinforcement learning where they begin with making a lot of errors and then become better with time as they learn continuously.
Day-to-Day Machine Learning Applications You Can Relate To –
- Your personal assistant Siri uses machine learning when you say “Set an Alarm for 5 AM in the morning”, “Remind me to visit my Friends day after tomorrow.”
- When you book an Ola or Uber, the app estimates the price for the ride using ML.
- When you log in to Facebook, it suggests who you can become friends with on the basis of continuous learning.
- When you use GPS Navigation services on Google Maps, it shows you a map of the current traffic and congested localities using machine learning.
- When you shop on Amazon or Flipkart, they recommend you products based on your browsing and purchase history using ML.
If you really want to learn more about Machine Learning (and you actually should)
There are tons of resources out there to dive deep into the machine learning ocean. You can begin learning machine learning with some introductory videos on the internet, enroll for comprehensive machine learning courses, and read a few machine learning books.
There’s a lot more to machine learning that cannot be explained in 5 minutes. Hope all non-experts enjoyed this quick read. If you liked this article, hit the social share icons and recommend it to anyone in your network who would benefit from this.