Gone through Step 1 problem definition we've gone through Step 2 data and step 3.
We've defined what success means for us.
Now let's get on to Step 4 which is features.
Now here the question we're trying to answer is what do we already know about the data.
Now if you haven't worked with data before you might hear this word features and be wondering what powders
features mean.
Well you'll hear this world come up a lot in machine learning.
Maybe in the form of feature learning or feature variables or when someone ask how many features are
there or what kind of features are there.
Features is another word for different forms of data.
Now we've already discussed different kinds of data such as structured and unstructured but features
refers to the different forms of data within structured or unstructured data.
For example let's go back to our predicting heart disease problem we might want to see if things such
as a person's body weight their sex their average resting heart rate and their chest pain rating can
be used to predict if they have heart disease or not.
These three things a patient's body weight sex average resting heart rate and chest pain are features
of the data that could also be referred to as feature variables.
In other words we want to use the feature variables to predict the target variables which is whether
or not a person has heart disease or no.
Now when it comes to feature variables again there are different kinds.
You've got numerical which means a number like body weight.
There's categorical which means one thing or another like sex or whether a patient is a smoker or not.
And then there's derived which is when someone like yourself looks at the data and creates a new feature
using the existing ones.
For example you might look at someone's hospital visit history timestamps and if they've had a visit
in the last year you could make a categorical feature called visited in last year.
If someone had visited in the last year they would get true.
Or in our case yes.
If not they would get false or in this case.
No.
The process of deriving features like this out of data is often referred to as feature engineering our
heart disease example is structured but unstructured data has features too.
They're just a little less obvious if you looked at enough images of dogs you'd start to figure out
OK.
Most of these creatures have four shapes coming out of their body their legs and a couple of circles
up the front their eyes as a machine learning algorithm looks at different images.
It would start to learn these different shapes and much more and figure out how different pictures are
similar or different to each other.
Don't worry when it comes to figuring out the different patterns between features such as the four rectangles
sort of shapes coming out of a dog's body or the circles at the front of the dog's head you don't have
to tell the machine learning algorithm what they are.
The beautiful thing is it because the mount on its own the final thing to remember is a feature works
best within a machine learning algorithm.
If many of the samples have it for an hour predicting heart disease problem say we had a feature which
was called most Eden Foods which had a list of the foods the Patient 8 most often but only 10 per cent
or 10 out of 100 patient records had it.
So this one idea for patient I.D. for 3 2 8 has most in food which is fries not ideal and these other
patients don't have it because remember only 10 out of 100 examples have the most eaten food.
They have data here and so these ones are just missing and that will be the same.
So if you can imagine there's 100 patients here only 10 of them will have this most eaten food column
filled.
Since a machine learning algorithm learns best when all samples have similar information.
We have to leave this one out or try to collect more information before using it the process of ensuring
all samples have similar information is called feature coverage.
In an ideal dataset you've got complete feature coverage.
So for us to want to to be able to use this feature of most in foods Ideally we'd want all values here
or at least more than 10 percent coverage which means that over 10 percent or over 10 and 100 examples
have some sort of value in this column.
We'll have plenty of practice looking at different features and coming lectures and projects and lessons.
In the meantime think about a problem you had to solve recently.
What features went into it.
Were they numerical or categorical or did you combine them into your own derived feature.