Skip to content

What is Classification?

Classification is a supervised machine learning task that assigns input data to one of several predefined categories or classes based on patterns learned from labeled training examples.

In classification, an algorithm is trained on data where each example already has a known label. The model learns decision boundaries that separate the different classes so it can predict the correct label for new, unseen inputs.

Common approaches include logistic regression, decision trees, support vector machines, and neural networks. Training minimizes prediction errors using loss functions, and the model is later evaluated on held-out test data.

Key challenges include handling imbalanced classes, choosing appropriate features, and avoiding overfitting so the model generalizes well to new data.

Example

A spam filter is a classic classification system: it is trained on thousands of emails already labeled 'spam' or 'not spam' and then predicts whether a new incoming message belongs to the spam class.

Why it matters

Classification powers everyday AI applications such as image recognition, medical diagnosis, fraud detection, and content moderation, making it one of the most widely deployed machine-learning techniques today.

Frequently asked questions

Classification predicts discrete categories (e.g., cat or dog), while regression predicts continuous numeric values (e.g., house price).