1
$\begingroup$

I was wondering what is the difference between regression kNN model and classification kNN model. I tried Googling and no success. In presentation from lectures we only have graphs of errors of mentioned models and no description as to what these models are.

$\endgroup$

3 Answers 3

4
$\begingroup$

The key differences are:

  • KNN regression tries to predict the value of the output variable by using a local average.
  • KNN classification attempts to predict the class to which the output variable belong by computing the local probability.
$\endgroup$
0
$\begingroup$

Knn Classifier: Predicts a class by using the highest majority category among its k nearest neighbors.

Knn Regression: Predicts a value by using the mean of the k nearest neighbors.

$\endgroup$
-1
$\begingroup$

I figured out that the difference is:

  • regression model: codomain of model is a continuous space, e.g. $\mathbb{R}$
  • classification model: codomain of model is a discrete space, e.g. $\{0,1\}$.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.