build linear regression from scratch python