Machine-Learning icon indicating copy to clipboard operation
Machine-Learning copied to clipboard

why are you returning the whole object while you don't need it?

Open MTayyabSaeed opened this issue 7 years ago • 0 comments

https://github.com/animesh-agarwal/Machine-Learning/blob/5b2d8a71984016ae021094641a3815d6ea9ac527/LinearRegression/LinearModel.py#L53

I have checked without returning the object and there is no need until you'll assign it to to the values of w_ and cost_. Even if you need to return it you just to return those attributes instead of the whole object.

MTayyabSaeed avatar Nov 01 '18 23:11 MTayyabSaeed