Advertisement
Guest User

Untitled

a guest
Jul 17th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. For iter = 1:num_iters
  2. htheta = X * theta;
  3. theta_tmp = zeros(3, 1);
  4. for row = 1:size(theta, 1)
  5. theta_tmp(row) = theta(row) - alpha / m * sum((htheta - y) .* X(:,row));
  6. end
  7. theta = theta_tmp;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement