generated from LufsX/Experiment-kNN
This commit is contained in:
+1
-1
@@ -45,7 +45,7 @@ name = "万子玉"
|
||||
def euclidean_distance(a, b):
|
||||
return np.sqrt(np.sum((a - b) ** 2))
|
||||
|
||||
def classify(input_vector, dataSet, labels, k=3):
|
||||
def classify(input_vector, dataSet, labels, k=2):
|
||||
"""
|
||||
KNN 分类算法。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user