#29 Machine Learning Specialization [Course 1, Week 2, Lesson 2]

A machine learning instructor shows how to engineer features for better predictions. Using house prices, they create a new feature by multiplying frontage and depth to get area, letting the model choose whether frontage, depth, or area best predicts the price.
Chapters
The choice of features can have a huge impact on your learning algorithm's performance. In fact, for many practical applications, choosing or entering the right features is a critical step to making the algorithm work well. In this video, let's take a look at how you can choose or engineer the most appropriate features for your learning algorithm. Let's take a look at feature engineering by revisiting the example of predicting the price of a house. Say you have two features for each house. X1 is the width of the lot size of the plot of land that the house is built on. This in real estate is also called the frontage of the lot. And the second feature x2 is the depth of the lot size of let's assume the rectangular plot of land that the house was built on. Given these two features, X1 and X2, you might build a model like this, where f is w1, x1 w2 x2 b, where x1 is the frontage or width and x2 is the depth. And this model might work okay. But here's another option for how you might choose a different way to use these features in the model that could be even more effective. You might notice that the area of the land can be calculated as the frontage or width times the depth. And you may have an intuition that the area of the land is more predictive of the price than the frontage and depth as separate features. So you might define a new feature x3 as x1 times x2. So this new feature x3 is equal to the area of the plot to land. With this feature, you can then have a model FWB of x equals w1 x1 plus w2 x2 w3 x3b so that the model can now choose parameters w1, w2 and w3, depending on whether the data shows the frontage or the depth or the area x3 of the lot turns out to be the most important thing for predicting the price of the house. What we just did creating a new feature is an example of what's called feature engineering, in which you might use your knowledge or intuition about the problem to design new features, usually by transforming or combining the original features of the problem in order to make it easier for the learning algorithm to make accurate predictions. So, depending on what insights you may have into the application, rather than just taking the features that you happen to have started off with, sometimes by defining new features, you might be able to get a much better model. So that's feature engineering. And it turns out that there's one flavor of feature engineering that allow you to fit not just straight lines, but curves non linear functions to your data. Let's take a look in the next video at how you can do that.










