Getting started with Classification (original) (raw)

Last Updated : 15 Jun, 2026

Classification is a supervised machine learning technique used to predict labels or categories from input data. It assigns each data point to a predefined class based on learned patterns.

**For example: A classification model might be trained on dataset of images labeled as either dogs or cats and it can be used to predict the class of new and unseen images as dogs or cats based on their features such as colour, texture or shape.

Classification

Cat-Dog Classification

Types of Classification

Classification in machine learning involves sorting data into categories based on their features or characteristics. The type of classification problem depends on how many classes exist and how the categories are structured.

Types-of-classification

Types of Classification

1. Binary Classification

Binary classification is the simplest type of classification where data is divided into two possible categories. The model analyzes input features and decides which of the two classes the data belongs to. Some important aspects of binary classification are:

2. Multiclass Classification

Multiclass classification is used when data needs to be divided into more than two categories. The model analyzes the input features and selects the class that best matches the data. Some important aspects of multiclass classification are:

**3. Multi Label Classification

Multi label classification allows a single piece of data to belong to multiple categories at the same time. Unlike multiclass classification, where each data point is assigned only one class, this approach allows the model to assign multiple labels to the same input. Key aspects include:

Working

Classification works by training a model on labeled data so it can learn patterns and predict the correct class for new inputs. The main steps involved are:

  1. **Data Collection: Start with a dataset where each data point has a correct label.
  2. **Feature Extraction: Identify important features such as color, shape or texture that help distinguish classes.
  3. **Model Training: The algorithm learns patterns that connect features to the correct class.
  4. **Model Evaluation: The trained model is tested on unseen data to measure its accuracy.
  5. **Prediction: The model predicts the class of new data based on learned patterns.
  6. **Model Improvement: If performance is not satisfactory, the model or its parameters are adjusted and retrained.

Classification Algorithms

To implement a classification model, it is important to understand the algorithms used for classification. One of the most commonly used algorithms is Logistic Regression. Classification algorithms can be grouped into different categories, such as:

1. Linear Classifiers

Linear classifier models create a linear decision boundary between classes. They are simple and computationally efficient. Some of the linear classification models are as follows:

2. Non linear Classifiers

Non linear models create non linear decision boundaries to separate classes. They can capture more complex relationships between input features and the target variable. Some common non linear classification models include:

Applications