Skip to content

Commit

Permalink
last minute typo fix in ex1.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
David Kaleko committed Dec 10, 2015
1 parent cc1e0fc commit f060b85
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions ex1/ex1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -346,22 +346,13 @@
},
"outputs": [],
"source": [
"print \"Final result theta parameters: \\n\",theta\n",
"print \"\\nCheck of result: What is price of house with 1650 square feet and 3 bedrooms?\"\n",
"#print \"Final result theta parameters: \\n\",theta\n",
"print \"Check of result: What is price of house with 1650 square feet and 3 bedrooms?\"\n",
"ytest = np.array([1650.,3.])\n",
"#To \"undo\" feature normalization, we \"undo\" 1650 and 3, then plug it into our hypothesis\n",
"ytestscaled = [(ytest[x]-stored_feature_means[x+1])/stored_feature_stds[x+1] for x in xrange(len(ytest))]\n",
"ytestscaled.insert(0,1)\n",
"print ytestscaled\n",
"#print \"$%0.2f\" % float(h(theta,ytestscaled))\n",
"#print ytest\n",
"#print ytest-stored_feature_means[1:]\n",
"#print stored_feature_means[1:]\n",
"ytestscaled = np.array((ytest-stored_feature_means[1:])/stored_feature_means[1:])\n",
"#print ytestscaled\n",
"ytestscaled = np.insert(np.array(ytestscaled),0,1)\n",
"print ytestscaled\n",
"#print \"$%0.2f\" % float(h(theta,ytestscaled))"
"print \"$%0.2f\" % float(h(theta,ytestscaled))"
]
},
{
Expand All @@ -387,7 +378,7 @@
},
"outputs": [],
"source": [
"print normEqtn(X,y)"
"#print normEqtn(X,y)"
]
},
{
Expand Down

0 comments on commit f060b85

Please sign in to comment.