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) # 打印预测结果和实际结果