Algorithm For Linear Regression