‫We've gone through step one problem definition.
‫We've gone through step two data.
‫And step three, we've defined what success means for us.
‫Now let's get on to step four, 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
‫the hell does 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 asks 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.
‫They 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 not.
‫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, okay, 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 pitches 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 rectangle
‫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 figures them out 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 now.
‫Predicting heart disease problem.
‫Say we had a feature which was called most Aden Foods, which had a list of the foods the patient ate
‫most often, but only 10% or ten out of 100 patient records had it.
‫So this one ID for patient ID for 3 to 8 has most in food, which is Fry's not ideal, and these other
‫patients don't have it because remember, only ten out of 100 examples have the most eaten food.
‫They have data here, so these ones are just missing and that'll be the same.
‫So if you can imagine, there's 100 patients here, only ten of them will have this most eaten food
‫column field.
‫And since the machine learning algorithm learns best when all samples have similar information, we
‫either 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
‫data set.
‫You've got complete feature coverage.
‫So for us to want to to be able to use this feature of most eating foods, ideally we'd want all values
‫here, or at least more than 10% coverage, which means that over 10% or over ten and 100 examples have
‫some sort of value in this column.
‫We'll have plenty of practice looking at different features in 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?