Summary for myself Updated from time to time Describe the command you used and examined ** I just need to know myself, so the terms may be wrong in some places **
!! View
#command
#Argument option description
import sklearn
import sklearn.neighbors import KNeighborsClassifier
#Instantiation of the KNeighborsClassifier class
knn = KNeighborsClassifier(n_neighbors=x)
n_neighbors = #How many points are approximate points for judgment
#Give training data to the algorithm
knn.fit(X,y)
X #data
y #label
#
Recommended Posts