generated from LufsX/Experiment-LogReg
This commit is contained in:
+1
-3
@@ -30,6 +30,7 @@ name = "tanjunfeng"
|
||||
# 这里写自己的代码实现
|
||||
import pandas as pd
|
||||
|
||||
|
||||
def load_data(train_path, test_path):
|
||||
"""
|
||||
加载训练数据和测试数据
|
||||
@@ -41,9 +42,6 @@ def load_data(train_path, test_path):
|
||||
Returns:
|
||||
tuple: 包含训练数据特征、训练数据标签、测试数据特征、测试数据标签
|
||||
"""
|
||||
train_path = "./data/horse-colic.data"
|
||||
test_path = "./data/horse-colic.test"
|
||||
train_X, train_y, test_X, test_y = load_data(train_path, test_path)
|
||||
train_data = pd.read_csv(train_path, header=None, na_values='?')
|
||||
test_data = pd.read_csv(test_path, header=None, na_values='?')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user