Skip to content

zhanggiene/linear_regression

Repository files navigation

use backpropagation to solve linear regression in 3D space

linear_regression_closed_form.py
use linear algebra method to find the best fit model in one shot.

gradient_descent_visualization.py
only one plot is drawn, easy for interactivity.

3plots_1costFunction.py
three plots from different angle plus one cost function plot are drawn.it takes computational power to process.

1, use numpy and sklearn to extract Boston housing prices data. two attributes are chosen .

2, implement gradient descent using python

https://towardsdatascience.com/implementation-of-multi-variate-linear-regression-in-python-using-gradient-descent-optimization-b02f386425b9

3, draw a plane in matplotlib . https://stackoverflow.com/questions/36013063/what-is-the-purpose-of-meshgrid-in-python-numpy the key of drawing a plane is to use meshgrid.

3, use the history of theta(the parameters for this regression model ) and animate 'historical plane' using matplotlib.animation function.

https://brushingupscience.com/2016/06/21/matplotlib-animations-the-easy-way/

reddit discussion

https://www.reddit.com/r/learnmachinelearning/comments/enleb8/gradient_descent_visualisation_in_linear/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages