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

This commit is contained in:
2024-10-29 07:51:04 +08:00
parent c408fbace3
commit d08174396c
+1 -1
View File
@@ -89,7 +89,7 @@ def load_data(filepath):
X = data[:, :-1] X = data[:, :-1]
y = data[:, -1] y = data[:, -1]
# 将标签转换为0和1(假设原始标签为1和2) # 将标签转换为0和1)假设原始标签为1和2)
y = np.where(y == 1, 0, 1) y = np.where(y == 1, 0, 1)
return X, y return X, y