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

This commit is contained in:
wzy
2024-10-24 17:24:26 +08:00
parent b880be4230
commit fd4f6d863b
+1 -1
View File
@@ -29,7 +29,7 @@ name = "万子玉"
def sigmoid(z):
return 1 / (1 + np.exp(-z))
def train_logreg(X, y, learning_rate=0.01, iterations=1000, batch_size=32, initial_weights=None):
def train_logreg(X, y, learning_rate=0.1, iterations=1000, batch_size=32, initial_weights=None):
X = np.insert(X, 0, 1, axis=1) # 添加偏置项
if initial_weights is None:
weights = np.zeros(X.shape[1])