Two types of kNN classifier algorithm The following is copy-pasted from a lecture note on machine learning...

k-NN classification can be realized in two ways:

*

*Selecting for the classified sample it's $k$ nearest neighbors for each class and computing than neighborhood radius $r_i$ for each of the classes. As the result of the classification, we select class $i$, for which its radius $r_i$ is the smallest.

*Selecting for the classified sample it's $k$ nearest neighbors in the training set (without taking class labels into account in this step). As the result of classification, we select class $i$ which is most numerous in the set of $k$ nearest neighbors of the classified sample.


Can anyone explain what points (1) and (2) talking about?
Are they talking about kNN for classification and kNN for regression, or something else?

Point #2 is the kNN I learned. It means that you look at the $k$ nearest points, say $7$, and make the classification based on those. If $5/7$ are $\text{cat}$ and $2/7$ are $\text{dog}$, you would predict a $\text{dog}$.$^{\dagger}$
Point #1 means that you select the $7$ nearest cats and the $7$ nearest dogs. I do not know what $r_i$ means, but perhaps that is defined elsewhere in the notes. Calculate $r_i$ for those $7$ cats and those $7$ dogs. Which $r_i$ is smallest of the $14?$ That class to which that belongs is the predicted class.
$^{\dagger}$Better yet, predict a $5/7$ probability of being a cat and a $2/7$ probability of being a dog.
