warnings.warn('"n_neighbors" is not a multiple of "n_classes". Got'
'{} and {}.One or more classes will have one less'
' instance.'.format(n_neighbors,
self.n_classes_))
I understood that n_neighborsrequires a multiply of a number of classes. But, for example, if I set n_neighbors =7 for binary classification of two classes, does it mean the final n_neighbors will be 6?
How about n_neighbors = 11 but with 3 classes? The final n_neighbors is 3 for each class?
the n_neighbors is still 7, however, the number of neighbors will be 4 belonging to one class and 3 belonging to the other (one class having more neighbors than the other).
Hi
I got this warning when using KNNE: https://github.com/scikit-learn-contrib/DESlib/blob/6ae0f5a8f837f1843ccf0a48ae89e911108aa3d2/deslib/util/knne.py#L243
I understood that
n_neighbors
requires a multiply of a number of classes. But, for example, if I setn_neighbors =7
for binary classification of two classes, does it mean the finaln_neighbors
will be 6?How about
n_neighbors = 11
but with 3 classes? The finaln_neighbors
is 3 for each class?