0% found this document useful (0 votes)
0 views10 pages

Classification in Machine Learning

Classification is a supervised machine learning technique that predicts the category of new data based on labeled training data. It can be categorized into binary, multiclass, and multi-label classifications, with real-life applications including email spam detection, medical diagnosis, and image classification. The process involves data collection, feature extraction, model training, evaluation, prediction, and improvement.

Uploaded by

menakababu4494
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views10 pages

Classification in Machine Learning

Classification is a supervised machine learning technique that predicts the category of new data based on labeled training data. It can be categorized into binary, multiclass, and multi-label classifications, with real-life applications including email spam detection, medical diagnosis, and image classification. The process involves data collection, feature extraction, model training, evaluation, prediction, and improvement.

Uploaded by

menakababu4494
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Classification in Machine Learning (Simple

Explanation)
Classification is a Supervised Machine Learning
technique used to predict the category (class) of
new data. The model learns from labeled data (data
with correct answers) and then predicts the class of
new data.
Simple Definition
Classification means putting things into the
correct category based on their features.
Real-Life Example
Imagine a teacher has two boxes:
 📦 Box 1 – Boys
 📦 Box 2 – Girls
When a new student arrives, the teacher looks at the
student and places them in the correct box.
Similarly, a classification model looks at the data and
decides which category it belongs to.

Example 1: Email Spam Detection


Suppose you receive an email.
The machine learning model checks features like:
 Contains many advertisements?
 Unknown sender?
 Too many links?
 Words like "Win Money", "Free Prize"?
Then it predicts:
Predicti
Email
on
"Congratulations! You won
Spam
₹10,00,000."
Not
"Tomorrow's class starts at 9 AM."
Spam
Here the classes are:
 Spam
 Not Spam

Example 2: Cat vs Dog


Suppose we train a computer with thousands of
images.
Imag Lab
e el
🐱 Cat
🐶 Dog
The model learns features like:
 Ear shape
 Tail
 Face
 Fur texture
Now if a new image comes,
Input: New animal image
Prediction: Dog
This is classification.

Why do we use Classification?


Classification helps us answer questions like:
 Is this email Spam or Not Spam?
 Is the patient Healthy or Diseased?
 Is the picture a Cat or Dog?
 Is the review Positive or Negative?

Types of Classification
1. Binary Classification
Binary means two classes only.
Example
Loan Approval
Predicti
Customer
on
Good credit
Approve
score
Poor credit
Reject
score
Only two possible answers:
 Approve
 Reject
Another example:
Email
 Spam
 Not Spam
Patient
 Diseased
 Healthy
Real-life example:
Think of a classroom attendance.
Teacher asks:
"Is the student present?"
Possible answers are only:
 Yes
 No
This is Binary Classification.

2. Multiclass Classification
Multiclass means more than two classes.
Each data item belongs to only one class.
Example
Animal Identification
The model predicts whether the animal is:
 Cat
 Dog
 Bird
If the image is a dog,
Prediction = Dog
It cannot be both Dog and Cat.
Another example:
Handwritten Digit Recognition
Possible classes:
0,1,2,3,4,5,6,7,8,9
If the image is digit 7,
Prediction = 7
Only one answer.
Real-life example
A teacher gives grades:
 A
 B
 C
 D
A student receives only one grade.
This is Multiclass Classification.

3. Multi-label Classification
One item can belong to multiple classes at the
same time.
Example
Movie Genres
Movie: "Jumanji"
It can belong to:
✅ Adventure
✅ Comedy
✅ Fantasy
One movie has multiple labels.
Another example:
Photo Tagging
A photo contains:
👩 Person
🐶 Dog
🌳 Tree
The model predicts all three labels together.
Real-life example
A student can be:
 Class Representative
 Cricket Player
 NSS Volunteer
The student has multiple roles at the same time.
This is Multi-label Classification.

How Classification Works


Step 1: Data Collection
Collect labeled data.
Example:
Frui
Label
t
🍎 Apple
Banan
🍌
a
🍎 Apple

Step 2: Feature Extraction


The model studies useful features.
For fruits:
 Color
 Size
 Shape
 Weight

Step 3: Model Training


The algorithm learns the relationship between the
features and the correct labels.
Example:
Red + Round → Apple
Yellow + Long → Banana

Step 4: Model Evaluation


Test the model using new data to check how accurate it
is.
Suppose 100 test images are used.
Correct predictions = 95
Accuracy = 95%

Step 5: Prediction
Now give a new fruit image.
The model predicts:
Apple

Step 6: Improvement
If the accuracy is low, collect more data or improve the
model and train it again.

Classification Algorithms
Different algorithms can perform classification.
Linear Classifiers
These create a straight-line decision boundary and
work well for simpler problems.
Examples:
 Logistic Regression
 Support Vector Machine (Linear SVM)
 Perceptron
 SGD Classifier
Non-linear Classifiers
These create curved or complex boundaries and
handle more complicated data.
Examples:
 K-Nearest Neighbors (KNN)
 Decision Tree
 Random Forest
 Kernel SVM
 AdaBoost
 Neural Networks

Applications of Classification
1. Email Spam Detection
Predicts whether an email is Spam or Not Spam.
2. Medical Diagnosis
Predicts whether a patient has a disease based on
medical test results.
3. Credit Risk Assessment
Predicts whether a loan applicant is likely to repay or
default.
4. Image Classification
Recognizes objects such as cats, dogs, faces, or traffic
signs.
5. Sentiment Analysis
Predicts whether a review is:
 Positive
 Negative
 Neutral
6. Fraud Detection
Identifies suspicious financial transactions.
7. Recommendation Systems
Helps recommend products, movies, or music based on
user preferences.

Easy Comparison of Classification Types


Number of
Type Example
Classes
Binary Spam / Not
2
Classification Spam
Multiclass More than 2 (one
Cat / Dog / Bird
Classification class only)
Multi-label Multiple labels at Movie = Action
Classification the same time + Comedy

You might also like