This is the code for the "How to Do Linear Regression the Right Way"
Here are some helpful links:
https://spin.atomicobject.com/wp-content/uploads/linear_regression_error1.png
https://spin.atomicobject.com/wp-content/uploads/linear_regression_gradient1.png
- numpy
Python 3 work for this Use
$ pip3 install numpyJust run python3 linear_regersion.py to see the results:
Starting gradient descent at b = 0, m = 0, error = 5565.107834483211
Running...
After 1000 iterations b = 0.08893651993741346, m = 1.4777440851894448, error = 112.61481011613473