SlideShare a Scribd company logo
Supervised vs. Unsupervised Learning
 Supervised learning (classification)
◦ Supervision: The training data (observations,
measurements, etc.) are accompanied by labels indicating
the class of the observations
◦ New data is classified based on the training set
 Unsupervised learning (clustering)
◦ The class labels of training data is unknown
◦ Given a set of measurements, observations, etc. with the
aim of establishing the existence of classes or clusters in
the data
Classification Algorithm in Machine Learning
CLASSIFICATION
 Classification
 predicts categorical class labels (discrete or nominal)
 classifies data (constructs a model) based on the training
set and the values (class labels) in a classifying attribute
and uses it in classifying new data
 Prediction
 models continuous-valued functions, i.e., predicts
unknown or missing values
 Typical applications
 Credit approval
 Target marketing
 Medical diagnosis
 Fraud detection
Classification vs. Prediction
Classification: Definition
 Given a collection of records (training set )
 Each record contains a set of attributes, one of the attributes is
the class.
 Find a model for class attribute as a function of
the values of other attributes.
 Goal: previously unseen records should be
assigned a class as accurately as possible.
 A test set is used to determine the accuracy of the model.
Usually, the given data set is divided into training and test sets,
with training set used to build the model and test set used to
validate it.
Classification—A Two-Step Process
 Model construction: describing a set of
predetermined classes
Each tuple/sample is assumed to belong to a
predefined class, as determined by the class
label attribute
The set of tuples used for model
construction is training set
The model is represented as classification
rules, decision trees, or mathematical
formulae
Classification—A Two-Step Process
 Model usage: for classifying future or unknown
objects
Estimate accuracy of the model
 The known label of test sample is compared
with the classified result from the model
 Accuracy rate is the percentage of test set
samples that are correctly classified by the
model
 Test set is independent of training set,
otherwise over-fitting will occur
If the accuracy is acceptable, use the model to
classify data tuples whose class labels are not
known
Classification Process (1): Model Construction
Training
Data
NAME RANK YEARS TENURED
Mike Assistant Prof 3 no
Mary Assistant Prof 7 yes
Bill Professor 2 yes
Jim Associate Prof 7 yes
Dave Assistant Prof 6 no
Anne Associate Prof 3 no
Classification
Algorithms
IF rank = ‘professor’
OR years > 6
THEN tenured = ‘yes’
Classifier
(Model)
Classification Process (2): Use the Model in Prediction
Classifier
Testing
Data
NAME RANK YEARS TENURED
Tom Assistant Prof 2 no
Merlisa Associate Prof 7 no
George Professor 5 yes
Joseph Assistant Prof 7 yes
Unseen Data
(Jeff, Professor, 4)
Tenured?
The Learning Process in spam mail Example
Email Server
● Number of recipients
● Size of message
● Number of attachments
● Number of "re's" in the
subject line
…
Model Learning Model
Testin
g
An Example
 A fish-packing plant wants to automate the
process of sorting incoming fish according to
species
 As a pilot project, it is decided to try to
separate sea bass from salmon using optical
sensing
Classification
An Example (continued)
 Features/attributes:
Length
Lightness
Width
Position of mouth

Classification
An Example (continued)
 Preprocessing: Images of different
fishes are isolated from one another
and from background;
 Feature extraction: The information
of a single fish is then sent to a feature
extractor, that measure certain
“features” or “properties”;
 Classification: The values of these
features are passed to a classifier that
evaluates the evidence presented, and
build a model to discriminate between
the two species
Classification
An Example (continued)
Classification
 Domain knowledge:
◦ A sea bass is generally longer than a salmon
 Related feature: (or attribute)
◦ Length
 Training the classifier:
◦ Some examples are provided to the classifier in this
form: <fish_length, fish_name>
◦ These examples are called training examples
◦ The classifier learns itself from the training examples,
how to distinguish Salmon from Bass based on the
fish_length
An Example (continued)
Classification
 Classification model (hypothesis):
◦ The classifier generates a model from the training data to classify
future examples (test examples)
◦ An example of the model is a rule like this:
◦ If Length >= l* then sea bass otherwise salmon
◦ Here the value of l* determined by the classifier
 Testing the model
◦ Once we get a model out of the classifier, we may use the
classifier to test future examples
◦ The test data is provided in the form <fish_length>
◦ The classifier outputs <fish_type> by checking fish_length against
the model
An Example (continued)
 So the overall
classification process
goes like this 
Classification
Preprocessing,
and feature
extraction
Training
Training Data
Model
Test/Unlabeled
Data
Testing against
model/
Classification
Feature vector
Preprocessing, and
feature extraction
Feature vector
Prediction/
Evaluation
An Example (continued)
Classification
Pre-
processing,
Feature
extraction
12, salmon
15, sea bass
8, salmon
5, sea bass
Training data
Feature vector
Training If len > 12,
then sea bass
else salmon
Model
Test data
15, salmon
10, salmon
18, ?
8, ?
Feature vector
Test/
Classify
sea bass (error!)
salmon (correct)
sea bass
salmon
Evaluation/Prediction
Pre-
processing,
Feature
extraction
Labeled data
Unlabeled data
An Example (continued)
Classification
 Why error?
 Insufficient training data
 Too few features
 Too many/irrelevant features
 Overfitting / specialization
An Example (continued)
Classification
Pre-
processing,
Feature
extraction
12, 4, salmon
15, 8, sea bass
8, 2, salmon
5, 10, sea bass
Training data
Feature vector
Training
If ltns > 6 or
len*5+ltns*2>100
then sea bass else
salmon
Model
Test data
15, 2, salmon
10, 7, salmon
18, 7, ?
8, 5, ?
Feature vector
Test/
Classify
salmon (correct)
salmon (correct)
sea bass
salmon
Evaluation/Prediction
Pre-
processing,
Feature
extraction
Linear, Non-linear, Multi-class
and
Multi-label classification
Linear Classification
 A linear classifier achieves this by making
a classification decision based on the value of
a linear combination of the characteristics.
 A classification algorithm (Classifier) that makes its
classification based on a linear predictor function
combining a set of weights with the feature vector
 Decision boundaries is flat
◦ Line, plane, ….
 May involve non-linear operations
Classification Algorithm in Machine Learning
Classification Algorithm in Machine Learning
Linear Classifiers
How would you
classify this data?
New Recipients
Email
Length
Linear Classifiers
New Recipients
Email
Length
Classification Algorithm in Machine Learning
Linear Classifiers
Any of these would
be fine..
..but which is best?
New Recipients
Email
Length
Classifier Margin
New Recipients
Define the margin of
a linear classifier
as the width that
the boundary
could be increased
by before hitting a
datapoint.
Email
Length
Classification Algorithm in Machine Learning
Classification Algorithm in Machine Learning
Classification Algorithm in Machine Learning
Classification Algorithm in Machine Learning
Classification Algorithm in Machine Learning
No Linear Classifier can cover all instances
How would you
classify this data?
New Recipients
Email
Length
• Ideally, the best decision boundary should
be the one which provides an optimal
performance such as in the following
figure
No Linear Classifier can cover all instances
Email
Length
New Recipients
What is multiclass
 Output
◦ In some cases, output space can be very large
(i.e., K is very large)
 Each input belongs to exactly one class
(c.f. in multilabel, input belongs to many classes)
Multi-Classes Classification
 Multi-class classification is simply
classifying objects into any one
of multiple categories. Such as
classifying just into either a dog
or cat from the dataset.
 1.When there are more than two
categories in which the images can
be classified, and
 2.An image does not belong to
more than one class

 If both of the above conditions are
satisfied, it is referred to as a multi-
class image classification problem
Classification Algorithm in Machine Learning
Multi-label classification
 When we can classify an image into
more than one class (as in the image
beside), it is known as a multi-label
image classification problem.
 Multi-label classification is a type
of classification in which an object
can be categorized into more than
one class.
 For example, In the image dataset,
we will classify a picture as
the image of a dog or cat and
also classify the same image based
on the breed of the dog or cat
 .
These are all labels of the given images. Each
image here belongs to more than one
class and hence it is a multi-label image
classification problem.
BinaryVs Multi-class
Classification Algorithm in Machine Learning
Multi classVs multi label classification
Ad

More Related Content

Similar to Classification Algorithm in Machine Learning (20)

dataminingclassificationprediction123 .pptx
dataminingclassificationprediction123 .pptxdataminingclassificationprediction123 .pptx
dataminingclassificationprediction123 .pptx
AsrithaKorupolu
 
Think-Aloud Protocols
Think-Aloud ProtocolsThink-Aloud Protocols
Think-Aloud Protocols
butest
 
Classification
ClassificationClassification
Classification
thamizh arasi
 
Classification and Prediction.pptx
Classification and Prediction.pptxClassification and Prediction.pptx
Classification and Prediction.pptx
SandeepAgrawal84
 
Unit 4 Classification of data and more info on it
Unit 4 Classification of data and more info on itUnit 4 Classification of data and more info on it
Unit 4 Classification of data and more info on it
randomguy1722
 
Machine learning and decision trees
Machine learning and decision treesMachine learning and decision trees
Machine learning and decision trees
Padma Metta
 
Classification in the database system.pptx
Classification in the database system.pptxClassification in the database system.pptx
Classification in the database system.pptx
YonaCastro1
 
4_22865_IS465_2019_1__2_1_08ClassBasic.ppt
4_22865_IS465_2019_1__2_1_08ClassBasic.ppt4_22865_IS465_2019_1__2_1_08ClassBasic.ppt
4_22865_IS465_2019_1__2_1_08ClassBasic.ppt
TSANKARARAO
 
Classification techniques in data mining
Classification techniques in data miningClassification techniques in data mining
Classification techniques in data mining
Kamal Acharya
 
Presentation flora
Presentation floraPresentation flora
Presentation flora
Flora eugin
 
Data Mining
Data MiningData Mining
Data Mining
SHIKHA GAUTAM
 
Research trends in data warehousing and data mining
Research trends in data warehousing and data miningResearch trends in data warehousing and data mining
Research trends in data warehousing and data mining
Er. Nawaraj Bhandari
 
Lecture 09(introduction to machine learning)
Lecture 09(introduction to machine learning)Lecture 09(introduction to machine learning)
Lecture 09(introduction to machine learning)
Jeet Das
 
BIS08 Application Development - II
BIS08 Application Development - IIBIS08 Application Development - II
BIS08 Application Development - II
Prithwis Mukerjee
 
Root cause of community problem for this discussion, you will i
Root cause of community problem for this discussion, you will iRoot cause of community problem for this discussion, you will i
Root cause of community problem for this discussion, you will i
ssusere73ce3
 
Presentation on supervised learning
Presentation on supervised learningPresentation on supervised learning
Presentation on supervised learning
Tonmoy Bhagawati
 
A Decision Tree Based Classifier for Classification & Prediction of Diseases
A Decision Tree Based Classifier for Classification & Prediction of DiseasesA Decision Tree Based Classifier for Classification & Prediction of Diseases
A Decision Tree Based Classifier for Classification & Prediction of Diseases
ijsrd.com
 
Unit - III Classification wjwjdbekwjwbdbekwk
Unit - III Classification wjwjdbekwjwbdbekwkUnit - III Classification wjwjdbekwjwbdbekwk
Unit - III Classification wjwjdbekwjwbdbekwk
mailmuzammil871
 
Ch06
Ch06Ch06
Ch06
maheswari narne
 
introducatio to ml introducatio to ml introducatio to ml
introducatio to ml introducatio to ml introducatio to mlintroducatio to ml introducatio to ml introducatio to ml
introducatio to ml introducatio to ml introducatio to ml
DecentMusicians
 
dataminingclassificationprediction123 .pptx
dataminingclassificationprediction123 .pptxdataminingclassificationprediction123 .pptx
dataminingclassificationprediction123 .pptx
AsrithaKorupolu
 
Think-Aloud Protocols
Think-Aloud ProtocolsThink-Aloud Protocols
Think-Aloud Protocols
butest
 
Classification and Prediction.pptx
Classification and Prediction.pptxClassification and Prediction.pptx
Classification and Prediction.pptx
SandeepAgrawal84
 
Unit 4 Classification of data and more info on it
Unit 4 Classification of data and more info on itUnit 4 Classification of data and more info on it
Unit 4 Classification of data and more info on it
randomguy1722
 
Machine learning and decision trees
Machine learning and decision treesMachine learning and decision trees
Machine learning and decision trees
Padma Metta
 
Classification in the database system.pptx
Classification in the database system.pptxClassification in the database system.pptx
Classification in the database system.pptx
YonaCastro1
 
4_22865_IS465_2019_1__2_1_08ClassBasic.ppt
4_22865_IS465_2019_1__2_1_08ClassBasic.ppt4_22865_IS465_2019_1__2_1_08ClassBasic.ppt
4_22865_IS465_2019_1__2_1_08ClassBasic.ppt
TSANKARARAO
 
Classification techniques in data mining
Classification techniques in data miningClassification techniques in data mining
Classification techniques in data mining
Kamal Acharya
 
Presentation flora
Presentation floraPresentation flora
Presentation flora
Flora eugin
 
Research trends in data warehousing and data mining
Research trends in data warehousing and data miningResearch trends in data warehousing and data mining
Research trends in data warehousing and data mining
Er. Nawaraj Bhandari
 
Lecture 09(introduction to machine learning)
Lecture 09(introduction to machine learning)Lecture 09(introduction to machine learning)
Lecture 09(introduction to machine learning)
Jeet Das
 
BIS08 Application Development - II
BIS08 Application Development - IIBIS08 Application Development - II
BIS08 Application Development - II
Prithwis Mukerjee
 
Root cause of community problem for this discussion, you will i
Root cause of community problem for this discussion, you will iRoot cause of community problem for this discussion, you will i
Root cause of community problem for this discussion, you will i
ssusere73ce3
 
Presentation on supervised learning
Presentation on supervised learningPresentation on supervised learning
Presentation on supervised learning
Tonmoy Bhagawati
 
A Decision Tree Based Classifier for Classification & Prediction of Diseases
A Decision Tree Based Classifier for Classification & Prediction of DiseasesA Decision Tree Based Classifier for Classification & Prediction of Diseases
A Decision Tree Based Classifier for Classification & Prediction of Diseases
ijsrd.com
 
Unit - III Classification wjwjdbekwjwbdbekwk
Unit - III Classification wjwjdbekwjwbdbekwkUnit - III Classification wjwjdbekwjwbdbekwk
Unit - III Classification wjwjdbekwjwbdbekwk
mailmuzammil871
 
introducatio to ml introducatio to ml introducatio to ml
introducatio to ml introducatio to ml introducatio to mlintroducatio to ml introducatio to ml introducatio to ml
introducatio to ml introducatio to ml introducatio to ml
DecentMusicians
 

More from Senthil Vit (20)

Logical Design Architecture in Internet of Things
Logical Design Architecture in Internet of ThingsLogical Design Architecture in Internet of Things
Logical Design Architecture in Internet of Things
Senthil Vit
 
Wireless sensor networks in Internet of Things
Wireless sensor networks in Internet of ThingsWireless sensor networks in Internet of Things
Wireless sensor networks in Internet of Things
Senthil Vit
 
Decision Trees Learning in Machine Learning
Decision Trees Learning in Machine LearningDecision Trees Learning in Machine Learning
Decision Trees Learning in Machine Learning
Senthil Vit
 
Operating system Virtualization_NEW.pptx
Operating system Virtualization_NEW.pptxOperating system Virtualization_NEW.pptx
Operating system Virtualization_NEW.pptx
Senthil Vit
 
Synchronization Peterson’s Solution.pptx
Synchronization Peterson’s Solution.pptxSynchronization Peterson’s Solution.pptx
Synchronization Peterson’s Solution.pptx
Senthil Vit
 
Control structures in Python programming
Control structures in Python programmingControl structures in Python programming
Control structures in Python programming
Senthil Vit
 
Data and Expressions in Python programming
Data and Expressions in Python programmingData and Expressions in Python programming
Data and Expressions in Python programming
Senthil Vit
 
Python programming Introduction about Python
Python programming Introduction about PythonPython programming Introduction about Python
Python programming Introduction about Python
Senthil Vit
 
Switching Problems.pdf
Switching Problems.pdfSwitching Problems.pdf
Switching Problems.pdf
Senthil Vit
 
Big Oh.ppt
Big Oh.pptBig Oh.ppt
Big Oh.ppt
Senthil Vit
 
AsymptoticNotations.ppt
AsymptoticNotations.pptAsymptoticNotations.ppt
AsymptoticNotations.ppt
Senthil Vit
 
snort.ppt
snort.pptsnort.ppt
snort.ppt
Senthil Vit
 
First Best and Worst Fit.pptx
First Best and Worst Fit.pptxFirst Best and Worst Fit.pptx
First Best and Worst Fit.pptx
Senthil Vit
 
File Implementation Problem.pptx
File Implementation Problem.pptxFile Implementation Problem.pptx
File Implementation Problem.pptx
Senthil Vit
 
Design Issues of an OS.ppt
Design Issues of an OS.pptDesign Issues of an OS.ppt
Design Issues of an OS.ppt
Senthil Vit
 
Operating Systems – Structuring Methods.pptx
Operating Systems – Structuring Methods.pptxOperating Systems – Structuring Methods.pptx
Operating Systems – Structuring Methods.pptx
Senthil Vit
 
deadlock.ppt
deadlock.pptdeadlock.ppt
deadlock.ppt
Senthil Vit
 
Virtualization.pptx
Virtualization.pptxVirtualization.pptx
Virtualization.pptx
Senthil Vit
 
Traffic-Monitoring.ppt
Traffic-Monitoring.pptTraffic-Monitoring.ppt
Traffic-Monitoring.ppt
Senthil Vit
 
Lect_2.pptx
Lect_2.pptxLect_2.pptx
Lect_2.pptx
Senthil Vit
 
Logical Design Architecture in Internet of Things
Logical Design Architecture in Internet of ThingsLogical Design Architecture in Internet of Things
Logical Design Architecture in Internet of Things
Senthil Vit
 
Wireless sensor networks in Internet of Things
Wireless sensor networks in Internet of ThingsWireless sensor networks in Internet of Things
Wireless sensor networks in Internet of Things
Senthil Vit
 
Decision Trees Learning in Machine Learning
Decision Trees Learning in Machine LearningDecision Trees Learning in Machine Learning
Decision Trees Learning in Machine Learning
Senthil Vit
 
Operating system Virtualization_NEW.pptx
Operating system Virtualization_NEW.pptxOperating system Virtualization_NEW.pptx
Operating system Virtualization_NEW.pptx
Senthil Vit
 
Synchronization Peterson’s Solution.pptx
Synchronization Peterson’s Solution.pptxSynchronization Peterson’s Solution.pptx
Synchronization Peterson’s Solution.pptx
Senthil Vit
 
Control structures in Python programming
Control structures in Python programmingControl structures in Python programming
Control structures in Python programming
Senthil Vit
 
Data and Expressions in Python programming
Data and Expressions in Python programmingData and Expressions in Python programming
Data and Expressions in Python programming
Senthil Vit
 
Python programming Introduction about Python
Python programming Introduction about PythonPython programming Introduction about Python
Python programming Introduction about Python
Senthil Vit
 
Switching Problems.pdf
Switching Problems.pdfSwitching Problems.pdf
Switching Problems.pdf
Senthil Vit
 
AsymptoticNotations.ppt
AsymptoticNotations.pptAsymptoticNotations.ppt
AsymptoticNotations.ppt
Senthil Vit
 
First Best and Worst Fit.pptx
First Best and Worst Fit.pptxFirst Best and Worst Fit.pptx
First Best and Worst Fit.pptx
Senthil Vit
 
File Implementation Problem.pptx
File Implementation Problem.pptxFile Implementation Problem.pptx
File Implementation Problem.pptx
Senthil Vit
 
Design Issues of an OS.ppt
Design Issues of an OS.pptDesign Issues of an OS.ppt
Design Issues of an OS.ppt
Senthil Vit
 
Operating Systems – Structuring Methods.pptx
Operating Systems – Structuring Methods.pptxOperating Systems – Structuring Methods.pptx
Operating Systems – Structuring Methods.pptx
Senthil Vit
 
Virtualization.pptx
Virtualization.pptxVirtualization.pptx
Virtualization.pptx
Senthil Vit
 
Traffic-Monitoring.ppt
Traffic-Monitoring.pptTraffic-Monitoring.ppt
Traffic-Monitoring.ppt
Senthil Vit
 
Ad

Recently uploaded (20)

Environment .................................
Environment .................................Environment .................................
Environment .................................
shadyozq9
 
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFTDeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
Kyohei Ito
 
04-Hot Work Permit sabic safe system of work wpr
04-Hot Work Permit sabic safe system of work wpr04-Hot Work Permit sabic safe system of work wpr
04-Hot Work Permit sabic safe system of work wpr
GulfamShahzad11
 
Particle Swarm Optimization by Aleksandar Lazinica (Editor) (z-lib.org).pdf
Particle Swarm Optimization by Aleksandar Lazinica (Editor) (z-lib.org).pdfParticle Swarm Optimization by Aleksandar Lazinica (Editor) (z-lib.org).pdf
Particle Swarm Optimization by Aleksandar Lazinica (Editor) (z-lib.org).pdf
DUSABEMARIYA
 
VISHAL KUMAR SINGH Latest Resume with updated details
VISHAL KUMAR SINGH Latest Resume with updated detailsVISHAL KUMAR SINGH Latest Resume with updated details
VISHAL KUMAR SINGH Latest Resume with updated details
Vishal Kumar Singh
 
An Explicit Formulation for Estimation of Structural Number (SN) of Flexible ...
An Explicit Formulation for Estimation of Structural Number (SN) of Flexible ...An Explicit Formulation for Estimation of Structural Number (SN) of Flexible ...
An Explicit Formulation for Estimation of Structural Number (SN) of Flexible ...
Journal of Soft Computing in Civil Engineering
 
Assessment of Statistical Models for Rainfall Forecasting Using Machine Learn...
Assessment of Statistical Models for Rainfall Forecasting Using Machine Learn...Assessment of Statistical Models for Rainfall Forecasting Using Machine Learn...
Assessment of Statistical Models for Rainfall Forecasting Using Machine Learn...
Journal of Soft Computing in Civil Engineering
 
Hostelmanagementsystemprojectreport..pdf
Hostelmanagementsystemprojectreport..pdfHostelmanagementsystemprojectreport..pdf
Hostelmanagementsystemprojectreport..pdf
RajChouhan43
 
Health & Safety .........................
Health & Safety .........................Health & Safety .........................
Health & Safety .........................
shadyozq9
 
Espresso PD Official MP_eng Version.pptx
Espresso PD Official MP_eng Version.pptxEspresso PD Official MP_eng Version.pptx
Espresso PD Official MP_eng Version.pptx
NingChacha1
 
1.10 Functions in C++,call by value .pdf
1.10 Functions in C++,call by value .pdf1.10 Functions in C++,call by value .pdf
1.10 Functions in C++,call by value .pdf
VikasNirgude2
 
HSE Induction for heat stress work .pptx
HSE Induction for heat stress work .pptxHSE Induction for heat stress work .pptx
HSE Induction for heat stress work .pptx
agraahmed
 
Observability and Instrumentation via OpenTelemetry.pptx
Observability and Instrumentation via OpenTelemetry.pptxObservability and Instrumentation via OpenTelemetry.pptx
Observability and Instrumentation via OpenTelemetry.pptx
grahnkarljohan
 
Introduction to Additive Manufacturing(3D printing)
Introduction to Additive Manufacturing(3D printing)Introduction to Additive Manufacturing(3D printing)
Introduction to Additive Manufacturing(3D printing)
vijimech408
 
AI Chatbots & Software Development Teams
AI Chatbots & Software Development TeamsAI Chatbots & Software Development Teams
AI Chatbots & Software Development Teams
Joe Krall
 
Comprehensive Guide to Distribution Line Design
Comprehensive Guide to Distribution Line DesignComprehensive Guide to Distribution Line Design
Comprehensive Guide to Distribution Line Design
Radharaman48
 
Full document for AI powered resume Analyzer
Full document for AI powered resume AnalyzerFull document for AI powered resume Analyzer
Full document for AI powered resume Analyzer
4213SWARNABCSE
 
22PCOAM16_MACHINE_LEARNING_UNIT_IV_NOTES_with_QB
22PCOAM16_MACHINE_LEARNING_UNIT_IV_NOTES_with_QB22PCOAM16_MACHINE_LEARNING_UNIT_IV_NOTES_with_QB
22PCOAM16_MACHINE_LEARNING_UNIT_IV_NOTES_with_QB
Guru Nanak Technical Institutions
 
Full_Cybersecurity_Project_Report_30_Pages.pdf
Full_Cybersecurity_Project_Report_30_Pages.pdfFull_Cybersecurity_Project_Report_30_Pages.pdf
Full_Cybersecurity_Project_Report_30_Pages.pdf
Arun446808
 
A Study of Bank Line Shifting of the Selected Reach of Jamuna River Using Mul...
A Study of Bank Line Shifting of the Selected Reach of Jamuna River Using Mul...A Study of Bank Line Shifting of the Selected Reach of Jamuna River Using Mul...
A Study of Bank Line Shifting of the Selected Reach of Jamuna River Using Mul...
Journal of Soft Computing in Civil Engineering
 
Environment .................................
Environment .................................Environment .................................
Environment .................................
shadyozq9
 
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFTDeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
Kyohei Ito
 
04-Hot Work Permit sabic safe system of work wpr
04-Hot Work Permit sabic safe system of work wpr04-Hot Work Permit sabic safe system of work wpr
04-Hot Work Permit sabic safe system of work wpr
GulfamShahzad11
 
Particle Swarm Optimization by Aleksandar Lazinica (Editor) (z-lib.org).pdf
Particle Swarm Optimization by Aleksandar Lazinica (Editor) (z-lib.org).pdfParticle Swarm Optimization by Aleksandar Lazinica (Editor) (z-lib.org).pdf
Particle Swarm Optimization by Aleksandar Lazinica (Editor) (z-lib.org).pdf
DUSABEMARIYA
 
VISHAL KUMAR SINGH Latest Resume with updated details
VISHAL KUMAR SINGH Latest Resume with updated detailsVISHAL KUMAR SINGH Latest Resume with updated details
VISHAL KUMAR SINGH Latest Resume with updated details
Vishal Kumar Singh
 
Hostelmanagementsystemprojectreport..pdf
Hostelmanagementsystemprojectreport..pdfHostelmanagementsystemprojectreport..pdf
Hostelmanagementsystemprojectreport..pdf
RajChouhan43
 
Health & Safety .........................
Health & Safety .........................Health & Safety .........................
Health & Safety .........................
shadyozq9
 
Espresso PD Official MP_eng Version.pptx
Espresso PD Official MP_eng Version.pptxEspresso PD Official MP_eng Version.pptx
Espresso PD Official MP_eng Version.pptx
NingChacha1
 
1.10 Functions in C++,call by value .pdf
1.10 Functions in C++,call by value .pdf1.10 Functions in C++,call by value .pdf
1.10 Functions in C++,call by value .pdf
VikasNirgude2
 
HSE Induction for heat stress work .pptx
HSE Induction for heat stress work .pptxHSE Induction for heat stress work .pptx
HSE Induction for heat stress work .pptx
agraahmed
 
Observability and Instrumentation via OpenTelemetry.pptx
Observability and Instrumentation via OpenTelemetry.pptxObservability and Instrumentation via OpenTelemetry.pptx
Observability and Instrumentation via OpenTelemetry.pptx
grahnkarljohan
 
Introduction to Additive Manufacturing(3D printing)
Introduction to Additive Manufacturing(3D printing)Introduction to Additive Manufacturing(3D printing)
Introduction to Additive Manufacturing(3D printing)
vijimech408
 
AI Chatbots & Software Development Teams
AI Chatbots & Software Development TeamsAI Chatbots & Software Development Teams
AI Chatbots & Software Development Teams
Joe Krall
 
Comprehensive Guide to Distribution Line Design
Comprehensive Guide to Distribution Line DesignComprehensive Guide to Distribution Line Design
Comprehensive Guide to Distribution Line Design
Radharaman48
 
Full document for AI powered resume Analyzer
Full document for AI powered resume AnalyzerFull document for AI powered resume Analyzer
Full document for AI powered resume Analyzer
4213SWARNABCSE
 
Full_Cybersecurity_Project_Report_30_Pages.pdf
Full_Cybersecurity_Project_Report_30_Pages.pdfFull_Cybersecurity_Project_Report_30_Pages.pdf
Full_Cybersecurity_Project_Report_30_Pages.pdf
Arun446808
 
Ad

Classification Algorithm in Machine Learning

  • 1. Supervised vs. Unsupervised Learning  Supervised learning (classification) ◦ Supervision: The training data (observations, measurements, etc.) are accompanied by labels indicating the class of the observations ◦ New data is classified based on the training set  Unsupervised learning (clustering) ◦ The class labels of training data is unknown ◦ Given a set of measurements, observations, etc. with the aim of establishing the existence of classes or clusters in the data
  • 4.  Classification  predicts categorical class labels (discrete or nominal)  classifies data (constructs a model) based on the training set and the values (class labels) in a classifying attribute and uses it in classifying new data  Prediction  models continuous-valued functions, i.e., predicts unknown or missing values  Typical applications  Credit approval  Target marketing  Medical diagnosis  Fraud detection Classification vs. Prediction
  • 5. Classification: Definition  Given a collection of records (training set )  Each record contains a set of attributes, one of the attributes is the class.  Find a model for class attribute as a function of the values of other attributes.  Goal: previously unseen records should be assigned a class as accurately as possible.  A test set is used to determine the accuracy of the model. Usually, the given data set is divided into training and test sets, with training set used to build the model and test set used to validate it.
  • 6. Classification—A Two-Step Process  Model construction: describing a set of predetermined classes Each tuple/sample is assumed to belong to a predefined class, as determined by the class label attribute The set of tuples used for model construction is training set The model is represented as classification rules, decision trees, or mathematical formulae
  • 7. Classification—A Two-Step Process  Model usage: for classifying future or unknown objects Estimate accuracy of the model  The known label of test sample is compared with the classified result from the model  Accuracy rate is the percentage of test set samples that are correctly classified by the model  Test set is independent of training set, otherwise over-fitting will occur If the accuracy is acceptable, use the model to classify data tuples whose class labels are not known
  • 8. Classification Process (1): Model Construction Training Data NAME RANK YEARS TENURED Mike Assistant Prof 3 no Mary Assistant Prof 7 yes Bill Professor 2 yes Jim Associate Prof 7 yes Dave Assistant Prof 6 no Anne Associate Prof 3 no Classification Algorithms IF rank = ‘professor’ OR years > 6 THEN tenured = ‘yes’ Classifier (Model)
  • 9. Classification Process (2): Use the Model in Prediction Classifier Testing Data NAME RANK YEARS TENURED Tom Assistant Prof 2 no Merlisa Associate Prof 7 no George Professor 5 yes Joseph Assistant Prof 7 yes Unseen Data (Jeff, Professor, 4) Tenured?
  • 10. The Learning Process in spam mail Example Email Server ● Number of recipients ● Size of message ● Number of attachments ● Number of "re's" in the subject line … Model Learning Model Testin g
  • 11. An Example  A fish-packing plant wants to automate the process of sorting incoming fish according to species  As a pilot project, it is decided to try to separate sea bass from salmon using optical sensing Classification
  • 12. An Example (continued)  Features/attributes: Length Lightness Width Position of mouth  Classification
  • 13. An Example (continued)  Preprocessing: Images of different fishes are isolated from one another and from background;  Feature extraction: The information of a single fish is then sent to a feature extractor, that measure certain “features” or “properties”;  Classification: The values of these features are passed to a classifier that evaluates the evidence presented, and build a model to discriminate between the two species Classification
  • 14. An Example (continued) Classification  Domain knowledge: ◦ A sea bass is generally longer than a salmon  Related feature: (or attribute) ◦ Length  Training the classifier: ◦ Some examples are provided to the classifier in this form: <fish_length, fish_name> ◦ These examples are called training examples ◦ The classifier learns itself from the training examples, how to distinguish Salmon from Bass based on the fish_length
  • 15. An Example (continued) Classification  Classification model (hypothesis): ◦ The classifier generates a model from the training data to classify future examples (test examples) ◦ An example of the model is a rule like this: ◦ If Length >= l* then sea bass otherwise salmon ◦ Here the value of l* determined by the classifier  Testing the model ◦ Once we get a model out of the classifier, we may use the classifier to test future examples ◦ The test data is provided in the form <fish_length> ◦ The classifier outputs <fish_type> by checking fish_length against the model
  • 16. An Example (continued)  So the overall classification process goes like this  Classification Preprocessing, and feature extraction Training Training Data Model Test/Unlabeled Data Testing against model/ Classification Feature vector Preprocessing, and feature extraction Feature vector Prediction/ Evaluation
  • 17. An Example (continued) Classification Pre- processing, Feature extraction 12, salmon 15, sea bass 8, salmon 5, sea bass Training data Feature vector Training If len > 12, then sea bass else salmon Model Test data 15, salmon 10, salmon 18, ? 8, ? Feature vector Test/ Classify sea bass (error!) salmon (correct) sea bass salmon Evaluation/Prediction Pre- processing, Feature extraction Labeled data Unlabeled data
  • 18. An Example (continued) Classification  Why error?  Insufficient training data  Too few features  Too many/irrelevant features  Overfitting / specialization
  • 19. An Example (continued) Classification Pre- processing, Feature extraction 12, 4, salmon 15, 8, sea bass 8, 2, salmon 5, 10, sea bass Training data Feature vector Training If ltns > 6 or len*5+ltns*2>100 then sea bass else salmon Model Test data 15, 2, salmon 10, 7, salmon 18, 7, ? 8, 5, ? Feature vector Test/ Classify salmon (correct) salmon (correct) sea bass salmon Evaluation/Prediction Pre- processing, Feature extraction
  • 21. Linear Classification  A linear classifier achieves this by making a classification decision based on the value of a linear combination of the characteristics.  A classification algorithm (Classifier) that makes its classification based on a linear predictor function combining a set of weights with the feature vector  Decision boundaries is flat ◦ Line, plane, ….  May involve non-linear operations
  • 24. Linear Classifiers How would you classify this data? New Recipients Email Length
  • 27. Linear Classifiers Any of these would be fine.. ..but which is best? New Recipients Email Length
  • 28. Classifier Margin New Recipients Define the margin of a linear classifier as the width that the boundary could be increased by before hitting a datapoint. Email Length
  • 34. No Linear Classifier can cover all instances How would you classify this data? New Recipients Email Length
  • 35. • Ideally, the best decision boundary should be the one which provides an optimal performance such as in the following figure
  • 36. No Linear Classifier can cover all instances Email Length New Recipients
  • 37. What is multiclass  Output ◦ In some cases, output space can be very large (i.e., K is very large)  Each input belongs to exactly one class (c.f. in multilabel, input belongs to many classes)
  • 38. Multi-Classes Classification  Multi-class classification is simply classifying objects into any one of multiple categories. Such as classifying just into either a dog or cat from the dataset.  1.When there are more than two categories in which the images can be classified, and  2.An image does not belong to more than one class   If both of the above conditions are satisfied, it is referred to as a multi- class image classification problem
  • 40. Multi-label classification  When we can classify an image into more than one class (as in the image beside), it is known as a multi-label image classification problem.  Multi-label classification is a type of classification in which an object can be categorized into more than one class.  For example, In the image dataset, we will classify a picture as the image of a dog or cat and also classify the same image based on the breed of the dog or cat  . These are all labels of the given images. Each image here belongs to more than one class and hence it is a multi-label image classification problem.
  • 43. Multi classVs multi label classification
  翻译: