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

This commit is contained in:
2024-10-31 15:08:50 +08:00
parent 2a3870f9fd
commit 6f5078e205
+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=1000,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])