From 6af6db58ac7f12ae0b43a93569f2055c735db011 Mon Sep 17 00:00:00 2001 From: Yijuehen <1906265724@qq.com> Date: Fri, 11 Oct 2024 20:21:54 +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 83ce202..79d3e6f 100644 --- a/function.py +++ b/function.py @@ -51,7 +51,7 @@ def classify0(inX, dataSet, labels, k=3): - k (int): KNN 算法参数,请自行设置默认值,评测时仅会使用其默认值。 Returns: - - int: 预测的分类标签。 + - int: 预测的分类标签。 """ # Step 1: 计算协方差矩阵的逆矩阵 covMat = np.cov(dataSet, rowvar=False) # 计算协方差矩阵