From the course: Applied Machine Learning: Supervised Learning

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Evaluating linear regression

Evaluating linear regression

- [Instructor] Once we've made our model, we need to know how to evaluate it. Is our model any good? One of the ways that you can evaluate a model is to capture some metrics and examine the metrics. Scikit_Learn provides various metrics. You might look at the Mean Absolute Error. What this does is it's going to all of your predictions and it's going to calculate the delta between the true value and what you predicted. Statisticians would call that value the residual, so you can think of the residual as the error. And we're going to take the absolute value of all of those residuals and average those. Why take the absolute value of them? Because it is possible that if you just summed up all of the residuals, you would have some that are positive, some that are negative, and they would cancel each other out if you sum those up. So, taking the absolute value of them lets you know that there is some error in there. Another common metric is the squared error. So, in this case, we're going…

Contents