December 2018
Intermediate to advanced
158 pages
3h 58m
English
We have seen that linear models, by themselves, fail to represent nonlinear real-world data. A possible solution is to add polynomial features to the hypotheses function. For example, a cubic model can be represented by the following equation:

Here, we need to choose two derived features to add to our model. These added terms could simply be the square and cube of the size feature in the housing example.
An important consideration when adding polynomial terms is feature scaling. The squared and cubic terms in this model will be of quite different scales. In order for gradient descent to work correctly, it is necessary to scale ...
Read now
Unlock full access