K Nearest model

Since we are using the same data to train and predict. why our error is not zero(or average success rate is 100)?

1 Like

When you score a model using the data seen during training you are computing what is called the training error. A vanishing training error is in general a sign of overfitting, meaning that the model is capturing noise in the training data, which is not desirable as you will see in the Module 2 of this MOOC.

For the moment consider two samples that share the exact same features but have different outcomes due to pure chance, for example, two houses that are identical but the owner of either is in a rush and decides to sell below the market price. No model would be able to capture this. Therefore, even overfitting may lead to a non vanishing training error.

2 Likes