Using the linear regression model to get slope (b) and yintercept (a) from the training data and predicting using the model generated.