In: Computer Science
1. Explain in your own words how the KNN Classifier works.
2. Why is overfitting a problem? Explain how can we overcome it
using a validation set.
Answer)
1) KNN would work with respect to finding the distance among the query as well as with respect to all of the examples in that of the data, meant for selecting the specified number of examples which was closest to that of the query and then have voting for the most frequent labels with respect to the classification or that of the average for the labels when regression is considered.
2) Overfitting is considered to be a model which is a condition wherein the statistic model begins for describing the error in a random manner instead of the relationship associated with that of the variables. There are certain problems that happen when the model becomes complex and there is overfitting of that of the regression model that can help in reducing the generalizability outside that of the original datasets.
There can be alot of noise fluctuation or any random fluctuation in that of the training data that are picked up and then learn about the concepts with regards to the model wherein the problem is that such concepts would not be applied to any new data that can negatively impact the model's ability for generalizing the things.
By using cross validation there can be some preventive measure against the overfitting, as there could be more data to be trained with regards to the algorithms and also remove some features.
Please comment in case you need any other inputs.
Please share a like if you find the answer helpful.
Thank you.