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

This commit is contained in:
2024-11-02 13:55:53 +08:00
parent 6e3b1409a5
commit a1dfa2ad30
+1 -1
View File
@@ -92,7 +92,7 @@ if __name__ == "__main__":
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42) 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 batch_size = 64
weights = train_logreg(X_train, y_train, learning_rate=0.1, iterations=1000, lambda_reg=0.01, batch_size=batch_size) weights = train_logreg(X_train, y_train, learning_rate=0.1, iterations=1000, lambda_reg=0.01, batch_size=batch_size)
# 测试单个数据 # 测试单个数据