diff --git a/function.py b/function.py index eca04c2..316cd2a 100644 --- a/function.py +++ b/function.py @@ -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 分类算法。