Imagine, from
many days you are planning to learn guitar. But due to this pandemic situation you
are not able to go out and take offline classes. So, you decided to learn
online from YouTube. You open your YouTube application and search for guitar
tutorials and you got some tutorial on it. You saw some videos and selected one
to learn from it.
Did you ever
imagine how it’s actually works, how you get the related videos?
Yes, you are
thinking Right. Its machine learning.
YouTube uses
machine learning algorithms to give you the best results. Which is one of the
types of machine learning algorithm – Recommendation system.
This is only one example! There are many others. Amazon
Echo understands you and can answer your questions. Your vacuum cleaner can
even navigate its way around your house while Netflix is recommending videos
that match your profile! Apple can recognize your friend’s face in the photo
you just took. Machine learning has become a massive part of our daily lives,
and it’s not going anywhere soon.
So, today in
this tutorial, we will try to learn Basics of machine learning and how it’s
actually works.
So, let’s
understand what is machine learning?
Machine Learning is nothing but getting
computers to program themselves.
If programming is automation, then machine learning is automating the process
of automation.
Writing software is the bottleneck, we
don’t have enough good developers. Let the data do the work instead of people. Machine
learning is the way to make programming scalable.
As you got some idea about what is
machine learning. But actually, you might be thinking why we need it.
In Traditional Programming we provide data and write a program which runs on the
computer and produce the output.
But in Machine Learning we
provide the data and output which runs on the computer to create a program or
function. This program / function can be used in traditional programming.
Machine learning is like farming or
gardening. Seeds are the algorithms, nutrients are the data, the gardener is
you, and plants are the programs.
Let’s understand this with a simple
example. Let’s say we want to predict the price of a new house based on the
size of the house, the number of bathrooms, and the number of rooms it has.
We could try to build a traditional algorithm
that answers this question. This algorithm would have to take the house
features, here three and return the predicted price based on an explicit rule.
In this example, the exact house pricing formula has to be known and coded
explicitly. But in practice, this formula is often not known.
On the other hand, we could build a machine learning
algorithm. First, such algorithm would define a model that can be an incomplete
formula created from our limited knowledge. Then, the
model would be adjusted by training on given housing prices examples.
Doing so, we combine a model with some data.
In general, machine
learning is incredibly useful for difficult tasks when we have incomplete
information or information that’s too complex to be coded by hand. In these cases, we
can give the information we have available to our model and let this one
“learn” the missing information that it needs by itself. The algorithm will
then use statistical techniques to extract the missing knowledge directly from
the data.
Machine learning can be broadly
classified into three types.
1) Supervised Learning
2) Unsupervised Learning
3) Reinforcement Learning
Supervised Learning
In supervised
learning, our aim is to build a model to predict the label of data based on
their given features. In order to learn mapping between features and labels,
the model has to be fitted on given examples of features with their related
labels. We say that “the model is trained on a labeled dataset.” And it known
as Supervised machine learning.
Now, our predicted
labels can be numbers or categories. For example, we could be building a model
that predicts the price of a house, implying we would want to predict a
label that’s a number. In this case, we called it as a regression model.
On the other hand,
we might also want to define a model that predicts a category, like “dog”
or “not dog”, based on given features. In this situation, the model is
called as a classification
model.
Some others
examples of regression and classification are:
Unsupervised Learning
In unsupervised learning, we want to
build a model that can infer a function to describe a hidden structure from
unlabeled data. Here, we will only have input data (X) and no corresponding
output variable.
The goal of the model is to find the
underlying structure or distribution in the data in order to learn more about
the data.
For example,
unsupervised learning algorithms can help answer questions like “are there
groups among my data?” or “is there any way to simplify the description of my
data?”.
Unsupervised learning
can be broadly divided into two types:
1)
Clustering
2)
Association
The
model can look for different kind of underlying structures in the data. If it
tries to find groups among the data, we would talk about a clustering
model. An example of a clustering model would be a model that
segments customers of a company based on their profiles.
On the other hand, when you want to discover rules that describe large portions of
your data, such as people that buy X also tend to buy Y is known as Association
problem.
Some of the real use cases of Association problem are Market
Basket Analysis and Web usage mining and intrusion detection.
Reinforcement learning
Reinforcement
learning is a type of dynamic programming that trains algorithms using a system
of reward and punishment.
A
reinforcement learning algorithm, or agent, learns by interacting with its
environment. The agent receives rewards by performing correctly and penalties
for performing incorrectly. The agent learns without intervention from a human
by maximizing its reward and minimizing its penalty.
Some of
the example of reinforcement learning are
Self-driving
cars
Aircraft control and robot motion
control etc.
As of now I think you understand
what is machine learning and its types.
Let me summaries it for you how
machine learning model works.
Imagine,
input is given to the machine learning model which then gives the output
according to the algorithm applied. If the output is correct, we take the
output as the final result else we provide feedback to the training model and
ask it to predict until it learns.
I hope
you understood machine learning and it types supervised, unsupervised and
reinforcement learning. Let’s see some of the applications of it.
Applications
of Machine Learning
Some of the applications of machine
learning are:
Web
Search: Google
uses this method to rank the page based on what you are most likely to click on.
YouTube
uses recommender system to recommend you some videos based on your search
history.
Gmail
uses a spam classifier to classify the mail into spam or not spam.
Uber
uses a machine learning algorithm to show you the estimated price based on your
given destination.
So, there are many more applications of Machine
learning in our day to day life. But do you ever think how it is possible even.
This is possible due the huge the huge amount of data
what we are producing on a daily basis which is used for analysis and also the
advanced in the computation power available with the advancement of the new
technology.
That all for machine learning basics from my side.
Like the Blog, then Share it with your friends and colleagues to make this AI community stronger.
To learn more about nuances of Artificial Intelligence, Python Programming, Deep Learning, Data Science and Machine Learning, visit our insideAIML blog page.