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

This commit is contained in:
2024-10-12 19:18:38 +08:00
parent 9ccc894dba
commit ed81af81b6
+1 -1
View File
@@ -41,7 +41,7 @@ name = "邓杰元"
# 这里写自己的代码实现
def classify0(inX, dataSet, labels, k=10):
def classify0(inX, dataSet, labels, k=20):
# 计算待分类样本与训练集中所有样本的欧氏距离
distances = [np.sqrt(np.sum((x - inX) ** 2)) for x in dataSet]