Explore Library
Code QuizIntermediate

Underfitting Detection Logic

Flagging underfitting from learning curves using the wrong boolean condition.

Codepython
train_score = 0.62
val_score = 0.60

# Underfitting: both scores are low and close
if train_score < 0.7 or val_score < 0.7:
    print('Underfitting suspected')
else:
    print('Model fits adequately')

What logic bug misclassifies models here?