SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Support Vector Machine with Iris
and Mushroom Dataset
SVM
• In this presentation, we will be learning the
characteristics of SVM by analyzing it with 2
different Datasets
• 1)IRIS
• 2)Mushroom
• Both will be implementing on WEKA Data
Mining Software
What is SVM?
• Support Vector Machine or Support Vector
Network are supervised learning model with
associated learning algorithm that analyze data
and recognize patterns, used
for classification and regression analysis.
• The basic SVM takes a set of input data and
predicts, for each given input, which of two
possible classes forms the output, making it a
non-probablistic binary linear classification
-wikipedia
IRIS and SVM
• IRIS Dataset: The Iris flower data set is
a multivariate dataset which quantifies the
structural variation of three related species of Iris
flower.
• Thus classification is done on the basis of flower
species which are:
• Iris-setosa------------------->Blue
• Iris-versicolor -----------------> Red
• Iris-verginica ------------------> CYAN colour
IRIS and SVM
• The data set consists of 50 samples/ instances from
each of three species that totals to 150.
• Four features were measured from each sample
• 1) Sepal Length
• 2) Petal Length
• 3) Sepal Width
• 4) Petal Width
• -- all in centimetres.
• To distinguish between the species linear discriminant
model is used.
• Linear discriminant analysis (LDA) are methods used to find a linear
combination of features which characterizes or separates two or more classes of objects or
events. (wikepedia)
IRIS and SVM
• So concerning our dataset, as we will be
simultaneously analysing the different behaviour of the
four features as mentioned above for the three
different species of the Iris flower.
• In IRIS, we will be implementing multi-class SVM
model, as there are more than 2 classes.
• We can see from the below image that class 'Iris
setosa' is linearly separable and other two classes are
not. Thus dataset like Iris is linearly not separable
which could be a best example to implement SVM.
Implementation of SVM
• The multi-class SVM will be implemented by LIBSVM library. LIBSVM
implements the SMO algorithm for kernelized support vector
machines(SVMs), supporting classification and regression. LIBSVM
implement one against one strategy for multiclass implementation.
LIBSVM to build SVM classes
• The one against one strategy, also known as “pairwise coupling”,
“all pairs” or “round robin”, consists in constructing one SVM for
each pair of classes. Thus, for a problem with c classes, c(c-1)/2
SVMs are trained to distinguish the samples of one class from the
samples of another class. Usually, classification of an unknown
pattern is done according to the maximum voting , where each SVM
votes for one class. [http://hal.archives-
ouvertes.fr/docs/00/10/39/55/PDF/cr102875872670.pdf pp.4]
General Classification of IRIS
• Its shown in the histogram that how different feature of each training
example i.e measurements of petal and sepal width and length, classify
each example into different classes. The below classification is on the basis
of sepal length
Classification-SVM algorithms
• To construct an optimal hyperplane, SVM employs an iterative
training algorithm, which is used to minimize an error
function. According to the form of the error function, SVM
models can be classified into four distinct groups:
• Classification SVM Type 1 (also known as C-SVM classification)
• Classification SVM Type 2 (also known as nu-SVM
classification)
• [https://www.statsoft.com/textbook/support-vector-
machines]
Testing both algorithms, it was found that C-SVM have better performance
over nu-SVM . The MSE and RSE in C-SVM was found as 0.22 and 0.149,
whereas the same in nu-SVM was measured as 0.26 and 0.16
Kernal Type. As it is on Multi-classes dataset thus it will be using
the kernel trick. There are four kernel functions available for
selection
SVM Kernels
• Radial basis kernel function is most popular and
most widely used from all. Different Kernel
Functions will generate different confusion
matrix
• In general, the RBF kernel is a reasonable first
choice. This kernel nonlinearly maps samples into
a higher dimensional space so it, unlike the linear
kernel, can handle the case when the relation
between class labels and attributes is nonlinear
SVM Kernels
• With Radial Basis
• With Polynomial Kernel
Testing Iris Dataset via
SVM
• Using same training set for
test set
• Using different test set
from the original training
set
• Cross validation method
• Percentage Split. if 10%
then it means 10% training
data and 90% test data
Cross Validation Technique
Results with 10-Fold Results with 15-Folds
Percentage Split Test Set
50% 70%
ROC Curve for Iris-Setosa
ROC Curve for Iris- Versicolor
ROC Curve for Iris-Virginica
MUSHROOM DATASET
• This dataset is a sample of 23 different species of
mushroom, which has the poisonous and edible
effect. Thus, the training set will categorize each
species in to 2 classes.. Thus it will train the
future mushroom samples to fall into either of
two categories depends upon its similarity with
the other 23 species.
• Total instances we have 8124
• In the following picture, Edible is shown in Blue
Poisonous is in Red
Mushroom and SVM
Following example will show how one of the feature of mushroom when have certain effect out of 9
categories, will classify it into Edible or Poisonous. Like if it smells Fishy i.e 'f' which have a count of 2160
has more probability of being poisonous.
Implementation of SVM
• In this dataset SVM model is used as binary classifier(default) doing linear
classification.
• It is implemented by Weka’s default algorithm SMO(Sequential Minimal
optimization), which is also used in LibSVM
• This implementation globally replaces all missing values and transforms
nominal attributes into binary ones. It also normalizes all attributes by default.
• Linear Binary kernel used k<x,y>=x,y
• As like LibSVM it has different kernel functions. By default it uses PolyKernel
pulls out the following result. I did try to implement other kernels but it was
too slow to process 8124 instances
As like LibSVM it has different kernel functions. By default it uses PolyKernel
that pulls out the following result. I did try to implement other kernels but it
was too slow to process 8124 instances
Cross Validation Technique
Results with 10-Fold Results with 90-Folds
Percentage Split Test Set
50% 70%
ROC for Edible Mushroom
ROC for Poisonous Mushroom

Weitere ähnliche Inhalte

Was ist angesagt?

Production System in AI
Production System in AIProduction System in AI
Production System in AIBharat Bhushan
 
Top Down Parsing, Predictive Parsing
Top Down Parsing, Predictive ParsingTop Down Parsing, Predictive Parsing
Top Down Parsing, Predictive ParsingTanzeela_Hussain
 
Line Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesLine Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesOmprakash Chauhan
 
Code generation in Compiler Design
Code generation in Compiler DesignCode generation in Compiler Design
Code generation in Compiler DesignKuppusamy P
 
01 ds and algorithm session_01
01 ds and algorithm session_0101 ds and algorithm session_01
01 ds and algorithm session_01Niit Care
 
Centralized shared memory architectures
Centralized shared memory architecturesCentralized shared memory architectures
Centralized shared memory architecturesGokuldhev mony
 
Cohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping AlgorithmCohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping AlgorithmMaruf Abdullah (Rion)
 
Dijkstra Searching Algorithms.pptx
Dijkstra Searching Algorithms.pptxDijkstra Searching Algorithms.pptx
Dijkstra Searching Algorithms.pptxsandeep54552
 
Matrix representation- CG.pptx
Matrix representation- CG.pptxMatrix representation- CG.pptx
Matrix representation- CG.pptxRubaNagarajan
 
implementation of travelling salesman problem with complexity ppt
implementation of travelling salesman problem with complexity pptimplementation of travelling salesman problem with complexity ppt
implementation of travelling salesman problem with complexity pptAntaraBhattacharya12
 
Monitors & workstation,Donald ch-2
Monitors & workstation,Donald ch-2Monitors & workstation,Donald ch-2
Monitors & workstation,Donald ch-2Iftikhar Ahmad
 
Heuristic search
Heuristic searchHeuristic search
Heuristic searchNivethaS35
 
Variants of Turing Machine
Variants of Turing MachineVariants of Turing Machine
Variants of Turing MachineRajendran
 
page replacement.pptx
page replacement.pptxpage replacement.pptx
page replacement.pptxhomipeh
 

Was ist angesagt? (20)

Greedy Algorihm
Greedy AlgorihmGreedy Algorihm
Greedy Algorihm
 
Production System in AI
Production System in AIProduction System in AI
Production System in AI
 
Top Down Parsing, Predictive Parsing
Top Down Parsing, Predictive ParsingTop Down Parsing, Predictive Parsing
Top Down Parsing, Predictive Parsing
 
Ai 8 puzzle problem
Ai 8 puzzle problemAi 8 puzzle problem
Ai 8 puzzle problem
 
Theory of computation Lec3 dfa
Theory of computation Lec3 dfaTheory of computation Lec3 dfa
Theory of computation Lec3 dfa
 
Operator precedence
Operator precedenceOperator precedence
Operator precedence
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introduction
 
Line Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesLine Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - Notes
 
Code generation in Compiler Design
Code generation in Compiler DesignCode generation in Compiler Design
Code generation in Compiler Design
 
01 ds and algorithm session_01
01 ds and algorithm session_0101 ds and algorithm session_01
01 ds and algorithm session_01
 
Centralized shared memory architectures
Centralized shared memory architecturesCentralized shared memory architectures
Centralized shared memory architectures
 
Top down parsing
Top down parsingTop down parsing
Top down parsing
 
Cohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping AlgorithmCohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping Algorithm
 
Dijkstra Searching Algorithms.pptx
Dijkstra Searching Algorithms.pptxDijkstra Searching Algorithms.pptx
Dijkstra Searching Algorithms.pptx
 
Matrix representation- CG.pptx
Matrix representation- CG.pptxMatrix representation- CG.pptx
Matrix representation- CG.pptx
 
implementation of travelling salesman problem with complexity ppt
implementation of travelling salesman problem with complexity pptimplementation of travelling salesman problem with complexity ppt
implementation of travelling salesman problem with complexity ppt
 
Monitors & workstation,Donald ch-2
Monitors & workstation,Donald ch-2Monitors & workstation,Donald ch-2
Monitors & workstation,Donald ch-2
 
Heuristic search
Heuristic searchHeuristic search
Heuristic search
 
Variants of Turing Machine
Variants of Turing MachineVariants of Turing Machine
Variants of Turing Machine
 
page replacement.pptx
page replacement.pptxpage replacement.pptx
page replacement.pptx
 

Ähnlich wie Support Vector Machine(SVM) with Iris and Mushroom Dataset

Support Vector machine(SVM) and Random Forest
Support Vector machine(SVM) and Random ForestSupport Vector machine(SVM) and Random Forest
Support Vector machine(SVM) and Random Forestumarcybermind
 
Kate · SlidesCarnival.pptx
Kate · SlidesCarnival.pptxKate · SlidesCarnival.pptx
Kate · SlidesCarnival.pptxAhmedSalah48055
 
ML Softmax JP 24.pptx
ML Softmax JP 24.pptxML Softmax JP 24.pptx
ML Softmax JP 24.pptxJayesh Patil
 
How Machine Learning Helps Organizations to Work More Efficiently?
How Machine Learning Helps Organizations to Work More Efficiently?How Machine Learning Helps Organizations to Work More Efficiently?
How Machine Learning Helps Organizations to Work More Efficiently?Tuan Yang
 
Svm implementation for Health Data
Svm implementation for Health DataSvm implementation for Health Data
Svm implementation for Health DataAbhishek Agrawal
 
report.doc
report.docreport.doc
report.docbutest
 
Support Vector Machines USING MACHINE LEARNING HOW IT WORKS
Support Vector Machines USING MACHINE LEARNING HOW IT WORKSSupport Vector Machines USING MACHINE LEARNING HOW IT WORKS
Support Vector Machines USING MACHINE LEARNING HOW IT WORKSrajalakshmi5921
 
Hardware Implementation of Cascade SVM
Hardware Implementation of Cascade SVMHardware Implementation of Cascade SVM
Hardware Implementation of Cascade SVMQian Wang
 
sentiment analysis using support vector machine
sentiment analysis using support vector machinesentiment analysis using support vector machine
sentiment analysis using support vector machineShital Andhale
 
SVM Based POS Tagger (copy)
SVM Based POS Tagger (copy)SVM Based POS Tagger (copy)
SVM Based POS Tagger (copy)Sidharth Kamboj
 
Evaluation of a hybrid method for constructing multiple SVM kernels
Evaluation of a hybrid method for constructing multiple SVM kernelsEvaluation of a hybrid method for constructing multiple SVM kernels
Evaluation of a hybrid method for constructing multiple SVM kernelsinfopapers
 
ML Module 3 Non Linear Learning.pptx
ML Module 3 Non Linear Learning.pptxML Module 3 Non Linear Learning.pptx
ML Module 3 Non Linear Learning.pptxDebabrataPain1
 
Seminar_New -CESG
Seminar_New -CESGSeminar_New -CESG
Seminar_New -CESGQian Wang
 
Data mining with Weka
Data mining with WekaData mining with Weka
Data mining with WekaAlbanLevy
 

Ähnlich wie Support Vector Machine(SVM) with Iris and Mushroom Dataset (20)

SVM
SVMSVM
SVM
 
Support Vector machine(SVM) and Random Forest
Support Vector machine(SVM) and Random ForestSupport Vector machine(SVM) and Random Forest
Support Vector machine(SVM) and Random Forest
 
svm.pptx
svm.pptxsvm.pptx
svm.pptx
 
Kate · SlidesCarnival.pptx
Kate · SlidesCarnival.pptxKate · SlidesCarnival.pptx
Kate · SlidesCarnival.pptx
 
ML Softmax JP 24.pptx
ML Softmax JP 24.pptxML Softmax JP 24.pptx
ML Softmax JP 24.pptx
 
How Machine Learning Helps Organizations to Work More Efficiently?
How Machine Learning Helps Organizations to Work More Efficiently?How Machine Learning Helps Organizations to Work More Efficiently?
How Machine Learning Helps Organizations to Work More Efficiently?
 
Svm implementation for Health Data
Svm implementation for Health DataSvm implementation for Health Data
Svm implementation for Health Data
 
report.doc
report.docreport.doc
report.doc
 
Moviereview prjct
Moviereview prjctMoviereview prjct
Moviereview prjct
 
Support Vector Machines USING MACHINE LEARNING HOW IT WORKS
Support Vector Machines USING MACHINE LEARNING HOW IT WORKSSupport Vector Machines USING MACHINE LEARNING HOW IT WORKS
Support Vector Machines USING MACHINE LEARNING HOW IT WORKS
 
Hardware Implementation of Cascade SVM
Hardware Implementation of Cascade SVMHardware Implementation of Cascade SVM
Hardware Implementation of Cascade SVM
 
Support vector machine-SVM's
Support vector machine-SVM'sSupport vector machine-SVM's
Support vector machine-SVM's
 
sentiment analysis using support vector machine
sentiment analysis using support vector machinesentiment analysis using support vector machine
sentiment analysis using support vector machine
 
Stock Market Prediction Using ANN
Stock Market Prediction Using ANNStock Market Prediction Using ANN
Stock Market Prediction Using ANN
 
SVM Based POS Tagger (copy)
SVM Based POS Tagger (copy)SVM Based POS Tagger (copy)
SVM Based POS Tagger (copy)
 
Evaluation of a hybrid method for constructing multiple SVM kernels
Evaluation of a hybrid method for constructing multiple SVM kernelsEvaluation of a hybrid method for constructing multiple SVM kernels
Evaluation of a hybrid method for constructing multiple SVM kernels
 
ML Module 3 Non Linear Learning.pptx
ML Module 3 Non Linear Learning.pptxML Module 3 Non Linear Learning.pptx
ML Module 3 Non Linear Learning.pptx
 
Seminar_New -CESG
Seminar_New -CESGSeminar_New -CESG
Seminar_New -CESG
 
Support vector machines
Support vector machinesSupport vector machines
Support vector machines
 
Data mining with Weka
Data mining with WekaData mining with Weka
Data mining with Weka
 

Kürzlich hochgeladen

Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseCeline George
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxMichelleTuguinay1
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptxDhatriParmar
 

Kürzlich hochgeladen (20)

Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 Database
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
 

Support Vector Machine(SVM) with Iris and Mushroom Dataset

  • 1. Support Vector Machine with Iris and Mushroom Dataset
  • 2. SVM • In this presentation, we will be learning the characteristics of SVM by analyzing it with 2 different Datasets • 1)IRIS • 2)Mushroom • Both will be implementing on WEKA Data Mining Software
  • 3. What is SVM? • Support Vector Machine or Support Vector Network are supervised learning model with associated learning algorithm that analyze data and recognize patterns, used for classification and regression analysis. • The basic SVM takes a set of input data and predicts, for each given input, which of two possible classes forms the output, making it a non-probablistic binary linear classification -wikipedia
  • 4. IRIS and SVM • IRIS Dataset: The Iris flower data set is a multivariate dataset which quantifies the structural variation of three related species of Iris flower. • Thus classification is done on the basis of flower species which are: • Iris-setosa------------------->Blue • Iris-versicolor -----------------> Red • Iris-verginica ------------------> CYAN colour
  • 5.
  • 6. IRIS and SVM • The data set consists of 50 samples/ instances from each of three species that totals to 150. • Four features were measured from each sample • 1) Sepal Length • 2) Petal Length • 3) Sepal Width • 4) Petal Width • -- all in centimetres. • To distinguish between the species linear discriminant model is used. • Linear discriminant analysis (LDA) are methods used to find a linear combination of features which characterizes or separates two or more classes of objects or events. (wikepedia)
  • 7. IRIS and SVM • So concerning our dataset, as we will be simultaneously analysing the different behaviour of the four features as mentioned above for the three different species of the Iris flower. • In IRIS, we will be implementing multi-class SVM model, as there are more than 2 classes. • We can see from the below image that class 'Iris setosa' is linearly separable and other two classes are not. Thus dataset like Iris is linearly not separable which could be a best example to implement SVM.
  • 8.
  • 9. Implementation of SVM • The multi-class SVM will be implemented by LIBSVM library. LIBSVM implements the SMO algorithm for kernelized support vector machines(SVMs), supporting classification and regression. LIBSVM implement one against one strategy for multiclass implementation. LIBSVM to build SVM classes • The one against one strategy, also known as “pairwise coupling”, “all pairs” or “round robin”, consists in constructing one SVM for each pair of classes. Thus, for a problem with c classes, c(c-1)/2 SVMs are trained to distinguish the samples of one class from the samples of another class. Usually, classification of an unknown pattern is done according to the maximum voting , where each SVM votes for one class. [http://hal.archives- ouvertes.fr/docs/00/10/39/55/PDF/cr102875872670.pdf pp.4]
  • 10. General Classification of IRIS • Its shown in the histogram that how different feature of each training example i.e measurements of petal and sepal width and length, classify each example into different classes. The below classification is on the basis of sepal length
  • 11. Classification-SVM algorithms • To construct an optimal hyperplane, SVM employs an iterative training algorithm, which is used to minimize an error function. According to the form of the error function, SVM models can be classified into four distinct groups: • Classification SVM Type 1 (also known as C-SVM classification) • Classification SVM Type 2 (also known as nu-SVM classification) • [https://www.statsoft.com/textbook/support-vector- machines]
  • 12. Testing both algorithms, it was found that C-SVM have better performance over nu-SVM . The MSE and RSE in C-SVM was found as 0.22 and 0.149, whereas the same in nu-SVM was measured as 0.26 and 0.16
  • 13. Kernal Type. As it is on Multi-classes dataset thus it will be using the kernel trick. There are four kernel functions available for selection
  • 14. SVM Kernels • Radial basis kernel function is most popular and most widely used from all. Different Kernel Functions will generate different confusion matrix • In general, the RBF kernel is a reasonable first choice. This kernel nonlinearly maps samples into a higher dimensional space so it, unlike the linear kernel, can handle the case when the relation between class labels and attributes is nonlinear
  • 15. SVM Kernels • With Radial Basis • With Polynomial Kernel
  • 16. Testing Iris Dataset via SVM • Using same training set for test set • Using different test set from the original training set • Cross validation method • Percentage Split. if 10% then it means 10% training data and 90% test data
  • 17. Cross Validation Technique Results with 10-Fold Results with 15-Folds
  • 18. Percentage Split Test Set 50% 70%
  • 19. ROC Curve for Iris-Setosa
  • 20. ROC Curve for Iris- Versicolor
  • 21. ROC Curve for Iris-Virginica
  • 22. MUSHROOM DATASET • This dataset is a sample of 23 different species of mushroom, which has the poisonous and edible effect. Thus, the training set will categorize each species in to 2 classes.. Thus it will train the future mushroom samples to fall into either of two categories depends upon its similarity with the other 23 species. • Total instances we have 8124 • In the following picture, Edible is shown in Blue Poisonous is in Red
  • 23.
  • 24. Mushroom and SVM Following example will show how one of the feature of mushroom when have certain effect out of 9 categories, will classify it into Edible or Poisonous. Like if it smells Fishy i.e 'f' which have a count of 2160 has more probability of being poisonous.
  • 25. Implementation of SVM • In this dataset SVM model is used as binary classifier(default) doing linear classification. • It is implemented by Weka’s default algorithm SMO(Sequential Minimal optimization), which is also used in LibSVM • This implementation globally replaces all missing values and transforms nominal attributes into binary ones. It also normalizes all attributes by default. • Linear Binary kernel used k<x,y>=x,y • As like LibSVM it has different kernel functions. By default it uses PolyKernel pulls out the following result. I did try to implement other kernels but it was too slow to process 8124 instances
  • 26.
  • 27. As like LibSVM it has different kernel functions. By default it uses PolyKernel that pulls out the following result. I did try to implement other kernels but it was too slow to process 8124 instances
  • 28. Cross Validation Technique Results with 10-Fold Results with 90-Folds
  • 29. Percentage Split Test Set 50% 70%
  • 30. ROC for Edible Mushroom
  • 31. ROC for Poisonous Mushroom

Hinweis der Redaktion

  1. C-SVC' and 'nu-SVC'. The original SVM formulations for Classification (SVC) used parameter C, [0, inf), to apply a penalty to the optimization for data points which were not correctly separated by the classifying hyperplane
  2. It is always better to have k larger as then the training set can pick all the relevant structure
  3. I don’t know why there is no change