From c81789fbd39988c81fb9d4c136dbe9edf07a1d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Batuhan=20Berk=20Ba=C5=9Fo=C4=9Flu?= Date: Mon, 22 Sep 2025 14:58:30 -0400 Subject: [PATCH] Updated the comments. --- mini-batch-sgd-logistic-regression-wdbc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mini-batch-sgd-logistic-regression-wdbc.py b/mini-batch-sgd-logistic-regression-wdbc.py index f41da8b..ef71567 100644 --- a/mini-batch-sgd-logistic-regression-wdbc.py +++ b/mini-batch-sgd-logistic-regression-wdbc.py @@ -87,8 +87,8 @@ class LogisticRegression: y_batch = self.y[idx] # it returns X and Y batch values from a randomly permuted indices from start to end - z = x_batch.dot(self.w) - p = self.sigmoid(z) + z = x_batch.dot(self.w) # linear prediction + p = self.sigmoid(z) # probabilities of the model predictions grad = x_batch.T.dot(p - y_batch) / y_batch.size # gradient calculation formula self.w -= self.lr * grad # gradient multiplied by learning rate is removed from weight