更新 function.py
Gitea Actions Experiment Test / Experiment-Actions (push) Successful in 26s

This commit is contained in:
wzy
2024-10-15 11:16:17 +08:00
parent eb4fef4ac5
commit f4a29faf0b
+1 -1
View File
@@ -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 分类算法。