SHARE
TWEET

Untitled

a guest Jul 17th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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;
RAW Paste Data
Top