UBC-DSCI / introduction-to-datascience

Open Source Textbook for DSCI100: Introduction to Data Science in R
https://datasciencebook.ca/
Other
51 stars 56 forks source link

Regression plotting at training data instead of fine grid #593

Open trevorcampbell opened 2 weeks ago

trevorcampbell commented 2 weeks ago

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:

trevorcampbell commented 1 week ago

This impacts the worksheets as well, I think