Classification Models for Grouping Data
The goal of a machine learning model is to learn from input data to derive specific conclusions.
A classification
model analyzes input data to predict one of predefined categories, known as classes
.
For instance, a classification model can distinguish between humans, cars, dogs in images, or analyze MRI scans to determine the presence or absence of diseases.
Characteristics of Classification Models
Classification models produce output as discrete values
.
Discrete values refer to values that can be represented as one of a finite set of choices, like integers, strings, or booleans.
The possible classes the model can predict are predefined.
For example, a handwritten digit recognition model classifies input images (digits) as one of the numbers from 0 to 9.
Input: Digit image → Output: One of 0, 1, 2, ..., 9
Classification models do not simply output a single correct answer, but rather predict the most likely class.
For example, an email spam filter might output probabilities for a given email as follows:
Input: Email content → Output: Spam (85%), Not Spam (15%)
Types of Classification Models
Classification problems are categorized based on the number of classes to predict.
1. Binary Classification
This involves predicting one of two classes.
Examples of binary classification problems include email spam filtering (spam vs. not spam) and disease diagnosis (disease present vs. absent).
2. Multi-Class Classification
This involves predicting one of three or more classes.
Examples of multi-class classification problems include handwritten digit recognition (one of 0~9) and flower type classification (rose, tulip, sunflower).
Various metrics like accuracy
, precision
, recall
, and F1-score
are used to evaluate the performance of classification models.
In the next lesson, we will take a closer look at accuracy.
Want to learn more?
Join CodeFriends Plus membership or enroll in a course to start your journey.