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
//why are we using below loop? Its a matrix multiplication I dont think we need to
//loop here. It will always give the same answer. Can you please tell me what is the benefit of using loop here?
for i in range(iters):
error = (X * theta.T) - y
The text was updated successfully, but these errors were encountered:
def gradientDescent(X, y, theta, alpha, iters):
temp = np.matrix(np.zeros(theta.shape))
parameters = int(theta.ravel().shape[1])
cost = np.zeros(iters)
//why are we using below loop? Its a matrix multiplication I dont think we need to
//loop here. It will always give the same answer. Can you please tell me what is the benefit of using loop here?
for i in range(iters):
error = (X * theta.T) - y
The text was updated successfully, but these errors were encountered: