From ad9ab582de194f52472fb198e54ca8852a8a7dc1 Mon Sep 17 00:00:00 2001 From: neingeist Date: Thu, 2 Oct 2014 22:33:18 +0200 Subject: [PATCH] Gradient descent for multiple features --- ex1/gradientDescentMulti.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ex1/gradientDescentMulti.m b/ex1/gradientDescentMulti.m index c98315b..d95607b 100644 --- a/ex1/gradientDescentMulti.m +++ b/ex1/gradientDescentMulti.m @@ -17,7 +17,9 @@ for iter = 1:num_iters % of the cost function (computeCostMulti) and gradient here. % + theta = theta - (alpha/m) * X' * (X*theta - y); + J = computeCostMulti(X, y, theta) % ============================================================