Exercise

# Going non-linear

You're about to see how it's possible to model non-linear relationships using linear regression models.

To make this "transition", you don't have to change anything in the model, you just have to generate:

- higher order features: \((a) \rightarrow (a, a^2, a^3, …)\), and
- interaction features: \((a, b) \rightarrow (a*b, a^2*b, a*b^2, …)\)

You will first try to fit a purely linear model to a quadratic process and check the R^2 score.

After that you'll use the function `PolynomialFeatures()`

to generate, well, *polynomial features* and see how much better your fit is -- both visually and according to the R^2 score.

Finally, you've been provided with the custom function `check_model_fit()`

that plots the model predictions against actual data and prints the R^2 score of your model.

Instructions 1/2

**undefined XP**

- Select the appropriate method to call the model training procedure.