building linear regression from scratch in python