This is a basic implementation of simple linear regression
This is the code implementation of simple linear regression. In this code I'm using python's statsmodel module to implement OLS (Ordinary Least Square) method of linear regression, for complete information aobut statsmodel's OLS, I suggest to visit This Link.
Requirements : Numpy, Pandas, Matplotlib, Statsmodel
This code is using 'real_estate_price_size.csv' as an input (I enclose the file in this repository). After importing the csv data usisng pandas I'm declaring the dependent and the independent variables wich are Price and Size. Since the variable declared I'm doing the regression with statsmodel and then visualizing it with matplotlib scatter and draw the regression line within.