Skip to content

Latest commit

 

History

History
13 lines (7 loc) · 738 Bytes

README.md

File metadata and controls

13 lines (7 loc) · 738 Bytes

Linear-Regression

This linear Regression is specificly for polynomial regression with one feature. It contains Batch gradient descent, Stochastic gradient descent, Close Form and Locally weighted linear regression. Because of the lack of enough data, it is hard to say it is overfiting or not. So I did not consider over-fititng problem.

To run this code, you only need to change one line

For example:

h, theta = Polynomial_Regression_One_Feature(xx, yy, ini_theta, 0.5, 21, method = "LWR"), or

h, theta = Polynomial_Regression_One_Feature(xx, yy, ini_theta, 0.02, 10**-7, method = "SGD")

Screenshot from 2019-03-26 22-44-01