Implementing Linear Regression from Scratch