Last active
March 26, 2019 13:25
-
-
Save joyhuang9473/70ff08a77597f684988c to your computer and use it in GitHub Desktop.
In ex1data2.txt, console outputs of predicted price with Octave
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % error output | |
| % ============ | |
| Normalizing Features ... | |
| Running gradient descent ... | |
| Theta computed from gradient descent: | |
| 334425.499894 | |
| 100131.267805 | |
| 3639.767537 | |
| Predicted price of a 1650 sq-ft, 3 br house (using gradient descent): | |
| $165561936.680953 | |
| Program paused. Press enter to continue. | |
| Solving with normal equations... | |
| theta = | |
| 8.9598e+04 | |
| 1.3921e+02 | |
| -8.7380e+03 | |
| Theta computed from the normal equations: | |
| 89597.909542 | |
| 139.210674 | |
| -8738.019112 | |
| Predicted price of a 1650 sq-ft, 3 br house (using normal equations): | |
| $293081.464335 | |
| % ============ | |
| % correct output | |
| % ============ | |
| Normalizing Features ... | |
| Running gradient descent ... | |
| Theta computed from gradient descent: | |
| 334425.499894 | |
| 100131.267805 | |
| 3639.767537 | |
| Predicted price of a 1650 sq-ft, 3 br house (using gradient descent): | |
| $281289.540773 | |
| Program paused. Press enter to continue. | |
| Solving with normal equations... | |
| theta = | |
| 8.9598e+04 | |
| 1.3921e+02 | |
| -8.7380e+03 | |
| Theta computed from the normal equations: | |
| 89597.909542 | |
| 139.210674 | |
| -8738.019112 | |
| Predicted price of a 1650 sq-ft, 3 br house (using normal equations): | |
| $293081.464335 | |
| % ============ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hello, could u pls tell me how to normalize features correctly? I have the same wrong answer, but I still dont know how to write a correct script after reading your code. Thank you!