Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions ex1/ex1_multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@
print theta

# Estimate the price of a 1650 sq-ft, 3 br house
price = np.array([1,3,1650]).dot(theta)
house = np.array([1650, 3])
house = (house - mu) / sigma
price = np.hstack((1, house)).dot(theta)

print 'Predicted price of a 1650 sq-ft, 3 br house'
print '(using gradient descent): '
Expand Down Expand Up @@ -119,7 +121,7 @@
print ' %s \n' % theta

# Estimate the price of a 1650 sq-ft, 3 br house
price = np.array([1, 3, 1650]).dot(theta)
price = np.array([1, 1650, 3]).dot(theta)

# ============================================================

Expand Down