I am looking at the docs for the K-NN and found this piece of code:
X = [[0], [1], [2], [3]]
y = [0, 0, 1, 1]
neigh = KNeighborsClassifier(n_neighbors=3)
neigh.fit(X, y)
KNeighborsClassifier(...)
print(neigh.predict([[3.1]]))
Looking at the class definition I see:
class sklearn.neighbors.KNeighborsClassifier(n_neighbors=5, *, weights='uniform', algorithm='auto', leaf_size=30, p=2, metric='minkowski', metric_params=None, n_jobs=None, **kwargs)
The second param is an *
here. Does the ... in KNeighborsClassifier(...)
and this *
have something to do with each other and if so what?