From 7665be967bdd8bf5b2b293da58384b1deda679ad Mon Sep 17 00:00:00 2001 From: Dengddd <3149942468@qq.com> Date: Wed, 30 Oct 2024 10:58:42 +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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/function.py b/function.py index 5d20e41..27ecb63 100644 --- a/function.py +++ b/function.py @@ -92,13 +92,13 @@ def load_data(filepath): # 主逻辑 if __name__ == "__main__": # 加载数据 - X, y = load_data('path_to_data_file.txt') + X, y = load_data("./data/horse-colic.data") # 训练模型 weights = train_logreg(X, y) # 加载测试数据并预测 - X_test, y_test = load_data('path_to_test_data_file.txt') + X_test, y_test = load_data("./data/horse-colic.test") predictions = predict_logreg(X_test, weights) # 打印预测结果和实际结果