Use Learning Curves to Choose the Remedy
More data helps some failures, not all
A learning curve plots training and validation performance as training-set size grows. If both plateau at poor performance with a small gap, more of the same data may not solve underfitting; improve features or capacity. If training is strong while validation improves steadily with more data, additional representative examples may reduce variance.
from sklearn.model_selection import learning_curve
sizes, train_scores, valid_scores = learning_curve(
pipeline, X, y, cv=5, scoring='f1', train_sizes=[.2,.4,.6,.8,1.0]
)
Other remedies include simplifying the model, stronger regularization, removing leaked or noisy features, improving labels, and collecting examples from weak slices. Always re-evaluate through the same untouched protocol.
Warning: More rows from the same biased source can reinforce a shortcut. Learning curves answer about quantity under current sampling, not whether sampling is correct.
Note: Do not tune on the final test set while diagnosing. Use training curves and validation folds, then evaluate the frozen choice once on test.