Concept icon
Concept

predict(X_test) for sklearn.neighbors.KNeighborsClassifier

After training the classifier, we can use the predict method, which takes in new data instances and returns the predicted corresponding labels (classes). It does so using averages of properties as calculated when fitting the estimator.

0

1

Concept icon
Updated 2020-10-19

Tags

Data Science