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

This commit is contained in:
cy
2024-10-26 17:51:02 +08:00
parent 2409dbf8d2
commit c894058da5
+2 -1
View File
@@ -117,7 +117,8 @@ if __name__ == "__main__":
X_test, y_test = load_data("./data/horse-colic.test") X_test, y_test = load_data("./data/horse-colic.test")
# 训练对率回归模型 # 训练对率回归模型
weights = train_logreg(X_train, y_train, learning_rate=0.01, iterations=1000) weights = train_logreg(X_train, y_train, learning_rate=0.01, iterations=1000, re
='l1')
# 测试单个数据 # 测试单个数据
y_pred = predict_logreg(X_test[11], weights) y_pred = predict_logreg(X_test[11], weights)