Linear Regression implementation in Python