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

This commit is contained in:
2024-11-01 10:41:02 +08:00
parent 61a0f9707e
commit b1ea40b284
+1 -1
View File
@@ -32,7 +32,7 @@ def train_logreg(X, y, learning_rate=0.01, iterations=1000, lambda_reg=0.01):
weights -= learning_rate * gradient
# 动态调整学习率
learning_rate *= 0.99 # 每次迭代将学习率乘以0.99
learning_rate *= 0.95 # 每次迭代将学习率乘以0.99
return weights