You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the code for calculating the loss for the LogisticRegressionGD, I noticed that the division by X.shape[0] is being applied only to the second term and not the whole equation: loss = -y.dot(np.log(output)) - ((1 - y).dot(np.log(1 - output))) / X.shape[0]
Shouldn't this be loss = ( -y.dot(np.log(output)) - ((1 - y).dot(np.log(1 - output))) ) / X.shape[0] ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In the code for calculating the loss for the LogisticRegressionGD, I noticed that the division by
X.shape[0]
is being applied only to the second term and not the whole equation:loss = -y.dot(np.log(output)) - ((1 - y).dot(np.log(1 - output))) / X.shape[0]
Shouldn't this be
loss = ( -y.dot(np.log(output)) - ((1 - y).dot(np.log(1 - output))) ) / X.shape[0]
?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions