Until now, I provided an example of identifying if an object
in an image is a dog or not a dog.
This type of task is called classification, and this
is a very popular use case in supervised learning.
Think about an email service, how the system can identify
which email is a spam or regular legitimate email.
This is a classical use case of classification.
The machine learning solution to be implemented in
such email service should automatically classify if a
new email is a spam or not.
We can't even imagine our life today without
using such features in any email system.
This type of classification is also called binary
classification, meaning only two options, two classes.
During the training phase, the classification algorithm will
be given labeled data points with emails that
are both spam and not spam.
Using this information, it will create a model with
a mapping function moving from x to y.
Then, when provided with an unseen new email,
the model will use this mapping function to
determine whether or not the email is spam.
Other classification tasks will require multiple values, multiple classes,
which is also called multiclass classification, like the task
of identifying if the color of a specific flower
is yellow, green, red or blue.
So here there are four classes.
We can build a binary classifier
or multiclass classifier using shallow learning
or using deep learning algorithms.
For example, one of the common
classification algorithms under the shallow learning
category is called Support Vector Machines.
Okay. As a reminder, we are still under the
supervised learning category and under the classification task,
which means we would like to build a
machine learning system that will classify data.
SVM, Support Vector Machine is an algorithm to
create such type of classifier as points in
space that are mapped into separate domains.
Let's see that in a visual way.
Imagine we have a data set of
people with their weight and height.
In machine learning terminology, this type
of information are called features. Okay.
We talked about it.
One feature is the weight and
another one is the height.
In addition, each person can be classified
as a male or a female.
So this is a binary classification task.
Now that group of data points can be placed
in two dimensional space, x1 and x2,
the weight and height, like you can see here.
Now, can we draw a line that will separate
between the two groups somehow, male and female.
Using this information, the weight and height features, I
can of course manually try to draw the line
here and maybe move that a little bit here.
There are many lines that might classify the data,
but it's not going to be an optimal line.
It is better to find the line that represent
the largest separation or margin between those classes.
The job of the Support Vector machine
algorithm is to search for this optimal
line, or better call it hyperplane, okay,
because in two dimension it's a line and it's
going to be a plane in three dimensions.
In our example, this line should break those
points into two groups, two classes, and it
is basically a simple math formula.
It will find a line that has
the maximum margin, meaning the maximum distance
between data points of both classes. Okay?
More margin will increase the chance to
classify correctly a future data points.
So when getting a new data point, the machine learning
system will use this line to decide if the point
is related to class A or class B.
Is that a male or a female?
Again, I don't want to go too deep here,
so let's zoom out to the big picture.
We talked about the first typical
task in supervised learning, meaning classification.
One common method to build such classifier in
shallow learning is called Support Vector Machine algorithm.
The task of classification is very
common in practical machine learning system.
Let's move to the next type
of task in supervised learning.