Linear regression_working

Correct the bugs in the Linear regression algorithm. Now its working