From fd17118e50aa1a4d5376ac6a34a4704cf3fcdb1e Mon Sep 17 00:00:00 2001 From: Shi Jun Date: Fri, 8 Jun 2018 02:41:00 +0900 Subject: [PATCH] Update price Because we want the price of a 1650 sq-ft, 3 br house, it's not the sum. I think it's theta0 + theta1 * x1 + theta2 * x2. --- Andrew Ng Stanford Coursera/Week 02/ex1/ex1_multi.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Andrew Ng Stanford Coursera/Week 02/ex1/ex1_multi.m b/Andrew Ng Stanford Coursera/Week 02/ex1/ex1_multi.m index ac54e3a..c3f79fc 100644 --- a/Andrew Ng Stanford Coursera/Week 02/ex1/ex1_multi.m +++ b/Andrew Ng Stanford Coursera/Week 02/ex1/ex1_multi.m @@ -104,7 +104,7 @@ % ====================== YOUR CODE HERE ====================== % Recall that the first column of X is all-ones. Thus, it does % not need to be normalized. -price = sum(X*theta); % You should change this +price = [1 1650 3] * theta; % You should change this % ============================================================ @@ -149,7 +149,7 @@ % Estimate the price of a 1650 sq-ft, 3 br house % ====================== YOUR CODE HERE ====================== -price = sum(X*theta); % You should change this +price = [1 1650 3] * theta; % You should change this % ============================================================