Underfitting is when a machine learning model is too simple to learn the pattern in its data. It cannot represent the relationship it is being asked to find.
A model like this gets things wrong even on the examples it was trained on. That is what makes it different from overfitting. It did not memorise too much. It never learned enough in the first place.
Think of it like this. A student skims the textbook once, the night before. Hand them the practice paper they already worked through and they still get half of it wrong. There is nothing to recall, because nothing went in.
Why it happens
- The model is too simple. A straight line cannot describe data that curves, no matter how much of it you have.
- The features do not carry the answer. If the inputs genuinely do not contain the signal, no model can find it. This is a data problem, not a model problem.
- Too much regularisation. Regularisation exists to stop overfitting. Turned up far enough, it works so well the model stops learning at all.
- Training stopped too early. Halting before the model has finished learning leaves it underfitted.
How to spot it
- Training accuracy is low. This is the giveaway. A model doing badly on data it has already seen cannot be blamed on memorising.
- Accuracy on new data is low too, and roughly the same as on training data. Both numbers are bad together.
- Adding data changes nothing. If more examples do not improve anything, the model has no room to hold the answer.
How to fix it
- Use a more capable model. More parameters, more layers, or an algorithm that can express curves and interactions.
- Add better features. Give the model inputs that actually carry the signal.
- Reduce regularisation. Ease the penalty so the model is allowed to learn.
- Train for longer. Let it finish converging before you stop.