From 209c70a80257c61a582f7a3312d0502544142894 Mon Sep 17 00:00:00 2001 From: harshkaso <39525600+harshkaso@users.noreply.github.com> Date: Mon, 22 Jul 2019 02:41:52 +0530 Subject: [PATCH 1/2] Update computeCostMulti.m --- mlclass-ex1/computeCostMulti.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlclass-ex1/computeCostMulti.m b/mlclass-ex1/computeCostMulti.m index d9a3d68..bec72e1 100644 --- a/mlclass-ex1/computeCostMulti.m +++ b/mlclass-ex1/computeCostMulti.m @@ -14,7 +14,7 @@ % You should set J to the cost. - +J = sum((X*theta - y).^2)/(2*m); % ========================================================================= From f693d92b486d8644b0d4688c6e0ccb22a8e441e9 Mon Sep 17 00:00:00 2001 From: harshkaso <39525600+harshkaso@users.noreply.github.com> Date: Mon, 22 Jul 2019 02:45:26 +0530 Subject: [PATCH 2/2] Update normalEqn.m --- mlclass-ex1/normalEqn.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlclass-ex1/normalEqn.m b/mlclass-ex1/normalEqn.m index d32cd8e..2c8c74a 100644 --- a/mlclass-ex1/normalEqn.m +++ b/mlclass-ex1/normalEqn.m @@ -12,7 +12,7 @@ % ---------------------- Sample Solution ---------------------- - +theta = pinv(X'*X)*(X'*y); % -------------------------------------------------------------