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

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