I was reading content on Data Leakage which said:
For example, imagine you run preprocessing (like fitting an imputer for missing values) before calling train_test_split(). The end result? Your model may get good validation scores, giving you great confidence in it, but perform poorly when you deploy it to make decisions.
How does excluding validation data from imputing result in a better model? Shouldn't it result in the model performing poorly with the missing values?
1.4m articles
1.4m replys
5 comments
57.0k users