Week 5 - Monday

We will use the ames data set from the modeldata library. It can be loaded using the following code

We will try to predict the Sale_Price of a house by the Longitude of its location (this would not be the best idea alone, but serves as an example). Use step_bs() to fit a spline onto Longitude use cross-validation to find the value of degree where the model performs best.

Next we will use step_discretize() and step_cut() to fit step function nto Longitude to see if that works better.