From f4a29faf0b8aec36972e867516f6659b4709e71e Mon Sep 17 00:00:00 2001 From: wzy <675163717@qq.com> Date: Tue, 15 Oct 2024 11:16:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20function.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- function.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 分类算法。