Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- For iter = 1:num_iters
- htheta = X * theta;
- theta_tmp = zeros(3, 1);
- for row = 1:size(theta, 1)
- theta_tmp(row) = theta(row) - alpha / m * sum((htheta - y) .* X(:,row));
- end
- theta = theta_tmp;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement