Machine Learning.
sklearn.linear_model. Let’s train the linear regression model using the training data-set. Now, let’s see how well the model is trained for both testing and training data-set. For this, we will make use of root mean squared error, mean absolute error and r2 score i.e. coefficient of determination.