The evaluation of linear regression is different from what we did in logistic regression. The most common method of evaluating a linear regression problem is based on the mean squared error rate. This can be implemented using the following code:
#evaluation for the regression - mean squared error sqerr<- (result$Actual-result$Prediction)^2 meansqerr<- sum(sqerr)/nrow(result) meansqerr [1] 104.1653
The preceding value is the error rate. We can tune the linear regression model until we arrive at the lowest error score.