Machine LearningClassification Fundamentals

What is classification in machine learning?

Classification in machine learning is a supervised learning task in which a model predicts which category (class) an observation belongs to.

Unlike regression, which predicts numerical quantities, classification predicts discrete labels such as spam or not spam.

Examples

  • Email filtering: Spam or Not Spam.
  • Loan risk: Default or No Default.
  • Document sorting: Finance, Sports, or Technology.

How does classification work?

  1. Training: The model learns patterns from examples containing input features and their known class labels.
  2. Prediction: For a new observation, it uses those patterns to predict a class. Many classifiers can also output a probability or score for each class.

Example: A spam classifier learns from previously labeled emails. For a new email, it may estimate a 90% probability of spam and classify it as Spam using a chosen decision threshold.

Main forms of classification

  • Binary classification: choose between two classes, such as Yes and No.
  • Multiclass classification: choose one class from three or more possibilities.
  • Multilabel classification: assign multiple applicable labels to the same observation.

Classification vs regression

  • Classification: predicts a category, even if that category is encoded as a number like 0 or 1.
  • Regression: predicts a numerical quantity, such as price, temperature, or revenue.

How is a classifier evaluated?

Common metrics include accuracy, precision, recall, and F1-score. The appropriate metric depends on which classification mistakes matter most.

In short, classification teaches a model to assign observations to predefined categories using patterns learned from labeled training data.

#what is classification in machine learning#classification machine learning explained#supervised classification examples#classification vs regression#types of classification#machine-learning#classification#supervised-learning#classification-fundamentals

Learning Sequence

Machine Learning Curriculum

56% Completed
Up NextMachine Learning

When should a classification model be used?

Explore Related Questions

Deepen your understanding across related Machine Learning topics.

Machinoai Logo
Machinoai

Your edge in the AI era. Deep dives into machine learning concepts, paper explainers, verified industry jobs, and developer tools.

© 2026 Machinoai. All rights reserved.