Implemented training and prediction with regression, and some tinkering with matplotlib