Decision boundary

A decision boundary is the line, curve, or surface a classification model draws to separate different classes in its training data. Every data point that lands on one side is assigned one label; everything on the other side gets a different one. It's essentially the model's way of saying “Anything here is X, anything there is Y.”

The shape of that boundary depends on the model being used. Linear classifiers like logistic regression and support vector machines (SVMs) draw a straight line in two dimensions or a flat hyperplane in higher dimensions. More complex models, like neural networks and decision trees, can produce curved, irregular boundaries that bend around the patterns in the data.

Where a decision boundary is drawn determines how well the model performs on new data. A boundary that curves too tightly around the training examples tends to overfit, while one that is too rigid tends to underfit.

Share