From 3f0ad0d4b09c7835a6ee4d6ead09cb7e717f06f2 Mon Sep 17 00:00:00 2001 From: wzy <675163717@qq.com> Date: Thu, 24 Oct 2024 17:29:56 +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 fab0b5b..244cb7d 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.1, iterations=1000, batch_size=32, initial_weights=None): +def train_logreg(X, y, learning_rate=0.001, 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])