When you're new to machine learning you
will hear this term 'features' a lot.
Features features, engineering things
like that,
and you might wonder what exactly is
features in terms of machine learning.
I'm going to give you very simple layman
explanation no mathematics involved. Let's say
you are doing a
property price prediction problem this
is one of the classical problems in
machine learning.
Here
you are trying to
predict the price of a home,
using machine learning based on certain
factors, such as area facilities
How old is the home? The location?
Obviously when you go to buy a home,
these are some of the factors that you
will use to determine the price of the
home.
And these factors are called features.
These are the factors based on which the
target variable, here it is price is
determined. Therefore,
in this case these are called features.
Let's look at another problem you're
trying to classify images, dog versus cat.
Let's think as a human you're walking on
the road.
You see dog or a cat
coming near to you.
How do you identify that it's a dog or a
cat and not a lion?
You do feature
detection in your brain.
You don't consciously realize but in
your brain there are neurons
and,
these units try to detect different
features. For example nose.
You look at the nose and you try to
identify is it a cat's nose, or a dog's
nose or a human nose?
Similar with other things such as eyes.
If you look at cats eyes they're round.
Dog's eyes are little different as you
can see in the diagram. Especially ears!
See here in this image dogs have the
ears which are kind of falling down and
cat will have pointed ears. So ears can
also help you determine whether it's a
cat or dog. So just think about this.
I don't give you the whole picture. Let's
say I give you just the ears. Based on
ears also, sometimes not all the time,
you can have some clue what kind of
animal this would be.
Then cats have very prominent whiskers,
you know the things that come out of uh
from between nose and her mouth.
So based on
these features you can determine whether
it's a cat or a dog.
So obviously the features here are eyes,
,nose, whiskers, ears and so on.
And when you use
neural network,
again I'm giving you a very simplistic
explanation. If you're looking for
detailed explanation go to YouTube.
Search for
'Code Basics convolutional neural network.'
I would have given
a better detailed example. But this is
more for a layman you know for your
like top level understanding.
You will have neurons and neurons is
just a unit which is doing a specific
task. So let's see one neuron is working
on
if it if it's a cat's ears or not?
Then there is another neuron which
detects whether it's a nose or not and
so on.
And if in the image you have cats ears
,nose and eyes, it means you have cat's
head. Similarly if you have cats legs and
tail, it means you have cat's body like
the body below the head. And if you have
answer for head and body is yes, then it
means it's a cat.
Think about different image where I just
put some portion of dog's image on top
of cat's image. Let's say if I show you
this image and ask you
is it a cat or not.
You might not be able to answer uh
correctly. Again I have made up this
example for your understanding.
But if I have mixed things up then what
happens is
my neural networks will say ears and
nose. They will say no,
if I ask whether this is for cat,
the answer will be no. Hence,
the answer for whether it's a cat's head
or not, will be no.
So my overall answer whether this is cat
or not, might be no. All right? So
we talked about property price
prediction example, which is a general uh
statistical machine learning problem.
Anything related to images is mostly
solved by something called convolutional
neural network. So you're getting into
the world of deep learning.
And when it comes to text, let's say I
have these three texts
okay? And I'm doing some natural language
processing problem.
And if I
ask you to extract features, if I say
okay what are the features of this text?
Now that's a tricky question. How do you
come up with the features of this text?
And if you play cricket you would know
Dhoni and Cummins, they are the
cricket players and Australia the word
'Australia' is a country. So you see the
first two are players. The third one is a
country.
How do you represent these three words,
which is Dhoni, Cummins and Australia
as a feature vector? Or or how to extract
features out of this?
One of the ways you can try is,
you can come up with a
set of factors such as personality,
healthy location, has two eyes, has
government and so on. If you look at
Dhoni he's a person yes. He's healthy and fit.
0.9 yes.
One means perfectly yes. 0.9 is yes he's
healthy and fit, I know but
maybe not as healthy, 0.9 right? So as close
as to 1.
Is it a location? Is dhoni a location? No
he's a person, it's not a location. So
zero.
Does dhoni have a government?
Well you might say yes,
maybe his wife and his kids. But
yeah the answer is zero.
But when you look at Australia as a
country, they have government. They are a
location. Does australia have two eyes? No.
So see,
when you get all these numbers, 1,
.9, 0 this forms a feature
vector.
So these are the features of text. Now I
I use some random example again for your
understanding. But there are
sophisticated
approaches available
in uh in the field of natural language
processing, such as word embedding.
And there are popular models such as
bird,
which can
extract these features
using
semi supervised or some sometimes people
call it unsupervised machine learning. I
hope that gives you a basic
understanding of what is features. If you
have any question post in a comment box
below. Also visit my website codebasics.io
for affordable courses. Right now
I have just python and data analysis in
PowerBI course. I'm planning to release
more courses and bootcamp in the future.
[Music]