In the regression chapter in the underfitting/overfitting section, we're plotting predictions at the training data, so when K=1 it looks like a piecewise linear interpolation of the data instead of a piecewise constant function that passes through every point. The fix to this is to plot at a fine grid of predictor points, not the training data.
In the regression chapter in the underfitting/overfitting section, we're plotting predictions at the training data, so when K=1 it looks like a piecewise linear interpolation of the data instead of a piecewise constant function that passes through every point. The fix to this is to plot at a fine grid of predictor points, not the training data.
Todos: