From 088e65b5327bdcefd4878aa4a150b329bb9f659e Mon Sep 17 00:00:00 2001 From: Xionghaoran <719929980@qq.com> Date: Mon, 21 Oct 2024 16:40:40 +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 ded04b7..d51ba87 100644 --- a/function.py +++ b/function.py @@ -43,7 +43,7 @@ name = "熊浩燃" # 这里写自己的代码实现 -def classify(input_vector, dataSet, labels, k=5, metric='euclidean', decision_rule='uniform', use_kdtree=False): +def classify(input_vector, dataSet, labels, k=7, metric='euclidean', decision_rule='uniform', use_kdtree=False): """ 优化后的 KNN 分类算法,包括 k 值调优、距离度量、决策规则和加速方法。