Applying Sci-kit Learn's kNN algorithm to Fresh Data
KNN is not fitted to &quot;the k-nearest neighbor points closest to the test data points&quot;. You specify the fit option, like:
neigh = KNeighborsClassifier(n_neighbors=3)
neigh.fit(X, y)

Usually this will be xtrain, ytrain, while you test the model performance using &quot;new&quot; (unseen) data and compare the true targets to the prediction.
neigh.predict(xtest)

or
neigh.predict_proba(xtest)

See docs: https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KNeighborsClassifier.html