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

This commit is contained in:
77
2024-11-01 22:11:39 +08:00
parent 1bd62be6a2
commit a9e5c58f12
+1 -2
View File
@@ -86,10 +86,10 @@ def load_data(filepath):
return X, y return X, y
def main(): def main():
# 更新文件路径以匹配实际位置
X_train, y_train = load_data("C:/Users/HP/Desktop/机器学习/Experiment-LogReg/data/horse-colic.data") X_train, y_train = load_data("C:/Users/HP/Desktop/机器学习/Experiment-LogReg/data/horse-colic.data")
X_test, y_test = load_data("C:/Users/HP/Desktop/机器学习/Experiment-LogReg/data/horse-colic.test") X_test, y_test = load_data("C:/Users/HP/Desktop/机器学习/Experiment-LogReg/data/horse-colic.test")
if X_train is not None and X_test is not None: if X_train is not None and X_test is not None:
# 特征缩放 # 特征缩放
scaler = StandardScaler() scaler = StandardScaler()
@@ -109,4 +109,3 @@ def main():
if __name__ == "__main__": if __name__ == "__main__":
main() main()