From a33c39759e84b5c98e3f0d888dd08736996662f7 Mon Sep 17 00:00:00 2001 From: Ulysses-ui <3233559397@qq.com> Date: Sun, 3 Nov 2024 14:59:56 +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 4533164..bee0046 100644 --- a/function.py +++ b/function.py @@ -88,7 +88,7 @@ def load_data(filepath): try: data. append([float(x) if x !='?'else np. nan for x in line_data]) except ValueError as e: - print(f"Error processing line: {line}. Error: fe}") + print(f"Error processing line: {line}. Error: {e}") data = np.array(data) data = np.nan_to_num(data,nan=np.nanmean(data,axis=0))#将缺失值用平均值代替 X = data[:,:-1]#特征