更新 function.py
Gitea Actions Experiment Test / Experiment-Actions (push) Successful in 24s

This commit is contained in:
hao
2024-11-02 13:41:17 +08:00
parent 9eeb7b54ba
commit aed2767f33
+1 -1
View File
@@ -65,7 +65,7 @@ def load_data(filepath):
- np.array: 特征数据。 - np.array: 特征数据。
- np.array: 标签数据。 - np.array: 标签数据。
""" """
# 使用 np.genfromtxt 加载数据,处理缺失值 '?' 为 0 # 使用 np.genfromtxt 加载数据并处理缺失值 '?' 为 0
data = np.genfromtxt(filepath, delimiter=" ", missing_values="?", filling_values=-1) data = np.genfromtxt(filepath, delimiter=" ", missing_values="?", filling_values=-1)
# 分离特征标签 # 分离特征标签