Optional lab: Feature engineering and Polynomial regression

Hi, folks!
In the optional lab at the part “An Alternate View” said:

Above, polynomial features were chosen based on how well they matched the target data. Another way to think about this is to note that we are still using linear regression once we have created new features. Given that, the best features will be linear relative to the target. This is best understood with an example.

and some code with a plot is given:

Is it right that for x^2 plot the data is linear because of function given y=x**2 ?

Hi, Yes, you are absolutely right. Initially our independent variable was x. But it was showing some non-linear behavior with dependent variables. But as soon as we changed the variable itself to x^2, and draw a graph between y and x^2, it show linear behavior. It means that we can make a linear model between y and x^2

2 Likes