From fd4f6d863be519836e8957f78dbc1df5869765fc Mon Sep 17 00:00:00 2001 From: wzy <675163717@qq.com> Date: Thu, 24 Oct 2024 17:24:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20function.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- function.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/function.py b/function.py index b5f0967..fab0b5b 100644 --- a/function.py +++ b/function.py @@ -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])