Overfitting and underfitting

In this exercise, you'll visually diagnose whether a model is overfitting or underfitting the training set.

For this purpose, we have trained two different models \(A\) and \(B\) on the auto dataset to predict the mpg consumption of a car using only the car's displacement (displ) as a feature.

The following figure shows you scatterplots of mpg versus displ along with lines corresponding to the training set predictions of models \(A\) and \(B\) in red.

diagnose

Which of the following statements is true?

This exercise is part of the course

Machine Learning with Tree-Based Models in Python

View Course

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise