K-nearest neighbours

KNeighborsClassifier vs RadiusNeighborsClassifier

Untitled

KNeighborsClassifier - Implementation

from sklearn.neighbors import KNeighborsClassifier
kneighbor_classifier = KNeighborsClassifier()

kneighbor_classifier.fit(X_train, y_train)

Hyperparameters

For 'ball_tree' and 'kd_tree' algorithms, there are some other parameters to be set.

RadiusNeighborsClassifier - Implementation