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

This commit is contained in:
2024-10-31 15:07:42 +08:00
parent 433db7c86d
commit 2a3870f9fd
+1 -1
View File
@@ -32,7 +32,7 @@ def sigmoid(z):
"""计算sigmoid函数"""
return 1 / (1 + np.exp(-z))
def train_logreg(X, y, learning_rate=0.01, iterations=1000l,2_penalty=0.01):
def train_logreg(X, y, learning_rate=0.01, iterations=1000,2_penalty=0.01):
"""对率回归训练函数。"""
weights = np.zeros(X.shape[1])