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

This commit is contained in:
2024-11-02 14:17:15 +08:00
parent eff3010bee
commit 0e1e2c9644
+1 -1
View File
@@ -117,7 +117,7 @@ if __name__ == "__main__":
# 使用 train_test_split 打乱并随机抽取数据
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
# 训练逻辑回归模型,设置 batch size
# 训练逻辑回归模型,设置 batch_size
batch_size = 32
weights = train_logreg(X_train, y_train, learning_rate=0.1, iterations=1000, lambda_reg=0.01, batch_size=batch_size)