UBC-DSCI / introduction-to-datascience-python

Open Source Textbook for DSCI100: Introduction to Data Science in Python
https://python.datasciencebook.ca
Other
10 stars 8 forks source link

Reconsider balancing data by resampling? #323

Open joelostblom opened 9 months ago

joelostblom commented 9 months ago

For the future, maybe we should reconsider the recommendation to rebalance data by duplicating observations in this section https://python.datasciencebook.ca/pull317/classification1.html#balancing. Both this year and last, I have encountered students who find that the optimal K=1 when they do this, and from visualizing the data it is impossible to see that the reason for that is that there is an exact copy of the data point that they are predicting hiding underneath it. Maybe this can be avoided by sampling in a smarter way, but we are introducing it in the first classification chapter where we haven't introduced any evaluation yet, so we might have to move it later as a more advanced topic if we do a smarter resampling (not sure what this would look like or if it is possible).