why can’t we use k-nearest neighbour here instead of Logistic regression or vice versa? what are the advantages of each over each other ?
Knn vs logistic regression
Hey @padmakar.kalghatgi, yes both can be applied for classification task. KNN being the naive approach, includes no training, it just stores the complete dataset, and work when the query points come. So no training is done in KNN. Whereas in Logistic Regression there is training involved and we learn, parameters like theta0, theta1, … thetan . So as soon as query data comes we can directly use these parameters to make prediction. So its faster than KNN. Also there is nor hard and fast rule that, KNN will always perform less than logistic. Logistic is better, but yeah it depends on dataset as well, which will perform better.
Hope this resolved your doubt.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.