SlideShare a Scribd company logo
1 of 3
Download to read offline
Designing a Minimum Distance to Class Mean
Classifier
Dipesh Shome
Department of Computer Science and Engineering
Ahsanullah Univarsity of Science and Technology
Dhaka, Bangladesh
160204045@aust.edu
Abstract—Minimum distance to mean classifier is classifica-
tion process in which the mean point is calculated for known
classes.Then unknown classes are assigned to the class which
is arithmetically closest to the mean value of a class. In this
experiment, we use linear discriminant function to classify test
data.Then plot decision boundary and found accuracy of 85/
Index Terms—minimum distance classifier,linear discriminant
function,decision boundary
I. INTRODUCTION
In minimum distance classifier to mean class, training is
done using the feature vector of known class.Each class is
denoted by its mean vector.Then mean of the feature vectors
for the object within the class is calculated. When unknown
sample come, the sample is classified by measuring the closest
mean vector.It is a simple classification and used to classify
unclassified sample when distribution of the classes form
spherical shape.
II. EXPERIMENTAL DESIGN / METHODOLOGY
A. Description of the different tasks:
Two-class set of prototypes have to be taken from “train.txt”
and “test.txt” files.
Task 1: Plot all sample points (train data) from both
classes, but samples from the same class should have the
same color and marker.
Task 2: Using a minimum distance classifier with respect to
‘class mean’, classify the test data points by plotting them
with the designated class-color but a different marker. Use
the Linear Discriminant Function given below. Also, plot the
class means.
gi(X) = X|
Ȳi −
1
2
Ȳi
|
Ȳi
Task 3:Draw the decision boundary between the two classes.
Task 4:Find accuracy.
B. Implementation
1) Plotting of all sample data of train data: Here we have
a training dataset which is consist of 12 samples belong to two
different classes. First task is to plot all the data point of both
class.For plotting we import two python library: Numpy and
Matplotlib. Scatter plot function and marker were used to plot
the samples from same classes with same color. Train class 1
is plotted using dot(.) marker with red color and train class
2 is plotted using star(*) marker with blue color.Finally, we
legend the plot and the plotted figure is given in Fig.1.
Fig. 1. Sample point Plotting
2) Test data classification and calculating the distance from
mean of each class using Linear discriminant function: In task
2, First we calculate the mean of each class and plot with same
class color.The mean point of class 1 is represented by marker
’1’ with red color and Class 2 mean point is represented in ’D’
with blue color. Then calculate the distance from the mean of
each class for each test sample using the Linear discriminant
function.
gi(X) = X|
Ȳi −
1
2
Ȳi
|
Ȳi
I modified the discriminant function for my task and for
two class the discriminant function became,
g1(X) = ¯
w1
|
x −
1
2
¯
w1
|
¯
w1
g2(X) = ¯
w2
|
x −
1
2
¯
w2
|
¯
w2
Decision Rule for classify test data is as,if g1(X) > g2(X)
then, X belongs to class 1
else
X belongs to class 2
Fig. 2. Decision Boundary plotting
3) Decision boundary drawing between two classes: For
decision boundary drawing, i consider all the possible point
within the range as those points maintain equal distance from
both classes.Then i used the maximum and minimum value
of x to calculate y using the following function for drawing
boundary line between two class
g1(x) = g2(x)
= ¯
w1
|
x −
1
2
¯
w1
|
¯
w1 − ¯
w2
|
x +
1
2
¯
w2
|
¯
w2
= ( ¯
w1
|
− ¯
w2)x −
1
2
( ¯
w1
|
¯
w1 − ¯
w2
|
¯
w2)
Now we can consider it as linear equation to determine the
decision boundary:
( ¯
w1
|
− ¯
w2)x −
1
2
( ¯
w1
|
¯
w1 − ¯
w2
|
¯
w2) = 0
Where ( ¯
w1
|
− ¯
w2) is coefficients and 1
2 ( ¯
w1
|
¯
w1 − ¯
w2
|
¯
w2)
is constant.The final equation is look like
y =
coefficient1 ∗ x + constant
coefficient2
After plotting the x and y values, a straight line equation
is created with red dot which represent the decision boundary
between two class.
III. RESULT ANALYSIS
Test data is consist of seven sample points and two
classes.six out seven data point is correctly classified using
minimum distance classifier and all the training sample is
classified correctly.So, we can say that accuracy is 85/
Fig. 3. Plotting of mean of the classes and test data using minimum distance
classifier with respect to class mean
IV. CONCLUSION
In this experiment, i tried to implement a simple minimum
distance to class mean classifier without complex mathe-
matical calculation.Here, some sample classified accurately
and some classified wrongly but the calculation speed is
too faster.The limitation of this classifier is its accuracy rate
is comparatively lower in nonlinear dataset as the decision
boundary between two class is linear
V. ALGORITHM IMPLEMENTATION / CODE
REFERENCES
[1] Vladimir Curic,“Classification Slide,”
[2] Minimum Distance Classifier, ”http://sar.kangwon.ac.kr/etc/rsnote/rsnote/cp11/cp11−
6.htm : : text = The

More Related Content

What's hot

PR-169: EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
PR-169: EfficientNet: Rethinking Model Scaling for Convolutional Neural NetworksPR-169: EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
PR-169: EfficientNet: Rethinking Model Scaling for Convolutional Neural NetworksJinwon Lee
 
Digital Image Processing_ ch2 enhancement spatial-domain
Digital Image Processing_ ch2 enhancement spatial-domainDigital Image Processing_ ch2 enhancement spatial-domain
Digital Image Processing_ ch2 enhancement spatial-domainMalik obeisat
 
Fuzzy c-means clustering for image segmentation
Fuzzy c-means  clustering for image segmentationFuzzy c-means  clustering for image segmentation
Fuzzy c-means clustering for image segmentationDharmesh Patel
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domainAshish Kumar
 
Handwritten Digit Recognition and performance of various modelsation[autosaved]
Handwritten Digit Recognition and performance of various modelsation[autosaved]Handwritten Digit Recognition and performance of various modelsation[autosaved]
Handwritten Digit Recognition and performance of various modelsation[autosaved]SubhradeepMaji
 
CC282 Unsupervised Learning (Clustering) Lecture 7 slides for ...
CC282 Unsupervised Learning (Clustering) Lecture 7 slides for ...CC282 Unsupervised Learning (Clustering) Lecture 7 slides for ...
CC282 Unsupervised Learning (Clustering) Lecture 7 slides for ...butest
 
Frequency domain methods
Frequency domain methods Frequency domain methods
Frequency domain methods thanhhoang2012
 
K-Nearest Neighbor Classifier
K-Nearest Neighbor ClassifierK-Nearest Neighbor Classifier
K-Nearest Neighbor ClassifierNeha Kulkarni
 
Introduction to Linear Discriminant Analysis
Introduction to Linear Discriminant AnalysisIntroduction to Linear Discriminant Analysis
Introduction to Linear Discriminant AnalysisJaclyn Kokx
 
Vc dimension in Machine Learning
Vc dimension in Machine LearningVc dimension in Machine Learning
Vc dimension in Machine LearningVARUN KUMAR
 
1.arithmetic & logical operations
1.arithmetic & logical operations1.arithmetic & logical operations
1.arithmetic & logical operationsmukesh bhardwaj
 

What's hot (20)

Sum of subset problem.pptx
Sum of subset problem.pptxSum of subset problem.pptx
Sum of subset problem.pptx
 
KNN
KNN KNN
KNN
 
PR-169: EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
PR-169: EfficientNet: Rethinking Model Scaling for Convolutional Neural NetworksPR-169: EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
PR-169: EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
 
Backtracking
BacktrackingBacktracking
Backtracking
 
Digital Image Processing_ ch2 enhancement spatial-domain
Digital Image Processing_ ch2 enhancement spatial-domainDigital Image Processing_ ch2 enhancement spatial-domain
Digital Image Processing_ ch2 enhancement spatial-domain
 
AlexNet
AlexNetAlexNet
AlexNet
 
KNN
KNNKNN
KNN
 
Fuzzy c-means clustering for image segmentation
Fuzzy c-means  clustering for image segmentationFuzzy c-means  clustering for image segmentation
Fuzzy c-means clustering for image segmentation
 
Graph coloring using backtracking
Graph coloring using backtrackingGraph coloring using backtracking
Graph coloring using backtracking
 
Densenet CNN
Densenet CNNDensenet CNN
Densenet CNN
 
Sharpening spatial filters
Sharpening spatial filtersSharpening spatial filters
Sharpening spatial filters
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domain
 
K Nearest Neighbor Algorithm
K Nearest Neighbor AlgorithmK Nearest Neighbor Algorithm
K Nearest Neighbor Algorithm
 
Handwritten Digit Recognition and performance of various modelsation[autosaved]
Handwritten Digit Recognition and performance of various modelsation[autosaved]Handwritten Digit Recognition and performance of various modelsation[autosaved]
Handwritten Digit Recognition and performance of various modelsation[autosaved]
 
CC282 Unsupervised Learning (Clustering) Lecture 7 slides for ...
CC282 Unsupervised Learning (Clustering) Lecture 7 slides for ...CC282 Unsupervised Learning (Clustering) Lecture 7 slides for ...
CC282 Unsupervised Learning (Clustering) Lecture 7 slides for ...
 
Frequency domain methods
Frequency domain methods Frequency domain methods
Frequency domain methods
 
K-Nearest Neighbor Classifier
K-Nearest Neighbor ClassifierK-Nearest Neighbor Classifier
K-Nearest Neighbor Classifier
 
Introduction to Linear Discriminant Analysis
Introduction to Linear Discriminant AnalysisIntroduction to Linear Discriminant Analysis
Introduction to Linear Discriminant Analysis
 
Vc dimension in Machine Learning
Vc dimension in Machine LearningVc dimension in Machine Learning
Vc dimension in Machine Learning
 
1.arithmetic & logical operations
1.arithmetic & logical operations1.arithmetic & logical operations
1.arithmetic & logical operations
 

Similar to Designing a Minimum Distance classifier to Class Mean Classifier

Implementing Minimum Error Rate Classifier
Implementing Minimum Error Rate ClassifierImplementing Minimum Error Rate Classifier
Implementing Minimum Error Rate ClassifierDipesh Shome
 
Designing A Minimum Distance to Class Mean Classifier
Designing A Minimum Distance to Class Mean ClassifierDesigning A Minimum Distance to Class Mean Classifier
Designing A Minimum Distance to Class Mean ClassifierMd. Toufique Hasan
 
Pattern Recognition: Class mean classifier
Pattern Recognition: Class mean classifierPattern Recognition: Class mean classifier
Pattern Recognition: Class mean classifierMd Mamunur Rashid
 
AI-Lec20 Clustering I - Kmean.pptx
AI-Lec20 Clustering I - Kmean.pptxAI-Lec20 Clustering I - Kmean.pptx
AI-Lec20 Clustering I - Kmean.pptxSyed Ejaz
 
Human Face Detection Based on Combination of Logistic Regression, Distance of...
Human Face Detection Based on Combination of Logistic Regression, Distance of...Human Face Detection Based on Combination of Logistic Regression, Distance of...
Human Face Detection Based on Combination of Logistic Regression, Distance of...IJCSIS Research Publications
 
Aaa ped-17-Unsupervised Learning: Dimensionality reduction
Aaa ped-17-Unsupervised Learning: Dimensionality reductionAaa ped-17-Unsupervised Learning: Dimensionality reduction
Aaa ped-17-Unsupervised Learning: Dimensionality reductionAminaRepo
 
Implementation of K-Nearest Neighbor Algorithm
Implementation of K-Nearest Neighbor AlgorithmImplementation of K-Nearest Neighbor Algorithm
Implementation of K-Nearest Neighbor AlgorithmDipesh Shome
 
Clustering-dendogram.pptx
Clustering-dendogram.pptxClustering-dendogram.pptx
Clustering-dendogram.pptxANKIT915111
 
K means clustering
K means clusteringK means clustering
K means clusteringkeshav goyal
 
Principal component analysis and lda
Principal component analysis and ldaPrincipal component analysis and lda
Principal component analysis and ldaSuresh Pokharel
 
PosterPresentations.com-3 6x48-Template-V5 - 副本
PosterPresentations.com-3 6x48-Template-V5 - 副本PosterPresentations.com-3 6x48-Template-V5 - 副本
PosterPresentations.com-3 6x48-Template-V5 - 副本Yijun Zhou
 
Shriram Nandakumar & Deepa Naik
Shriram Nandakumar & Deepa NaikShriram Nandakumar & Deepa Naik
Shriram Nandakumar & Deepa NaikShriram Nandakumar
 
Fessant aknin oukhellou_midenet_2001:comparison_of_supervised_self_organizing...
Fessant aknin oukhellou_midenet_2001:comparison_of_supervised_self_organizing...Fessant aknin oukhellou_midenet_2001:comparison_of_supervised_self_organizing...
Fessant aknin oukhellou_midenet_2001:comparison_of_supervised_self_organizing...ArchiLab 7
 
Aplicaciones de espacios y subespacios vectoriales en la carrera de tecnologi...
Aplicaciones de espacios y subespacios vectoriales en la carrera de tecnologi...Aplicaciones de espacios y subespacios vectoriales en la carrera de tecnologi...
Aplicaciones de espacios y subespacios vectoriales en la carrera de tecnologi...ERIKAMARIAGUDIOSANTA
 
k-mean-clustering.ppt
k-mean-clustering.pptk-mean-clustering.ppt
k-mean-clustering.pptRanimeLoutar
 
k-mean-Clustering impact on AI using DSS
k-mean-Clustering impact on AI using DSSk-mean-Clustering impact on AI using DSS
k-mean-Clustering impact on AI using DSSMarkNaguibElAbd
 
Lecture_3_k-mean-clustering.ppt
Lecture_3_k-mean-clustering.pptLecture_3_k-mean-clustering.ppt
Lecture_3_k-mean-clustering.pptSyedNahin1
 

Similar to Designing a Minimum Distance classifier to Class Mean Classifier (20)

Implementing Minimum Error Rate Classifier
Implementing Minimum Error Rate ClassifierImplementing Minimum Error Rate Classifier
Implementing Minimum Error Rate Classifier
 
Designing A Minimum Distance to Class Mean Classifier
Designing A Minimum Distance to Class Mean ClassifierDesigning A Minimum Distance to Class Mean Classifier
Designing A Minimum Distance to Class Mean Classifier
 
Pattern Recognition: Class mean classifier
Pattern Recognition: Class mean classifierPattern Recognition: Class mean classifier
Pattern Recognition: Class mean classifier
 
AI-Lec20 Clustering I - Kmean.pptx
AI-Lec20 Clustering I - Kmean.pptxAI-Lec20 Clustering I - Kmean.pptx
AI-Lec20 Clustering I - Kmean.pptx
 
Human Face Detection Based on Combination of Logistic Regression, Distance of...
Human Face Detection Based on Combination of Logistic Regression, Distance of...Human Face Detection Based on Combination of Logistic Regression, Distance of...
Human Face Detection Based on Combination of Logistic Regression, Distance of...
 
Aaa ped-17-Unsupervised Learning: Dimensionality reduction
Aaa ped-17-Unsupervised Learning: Dimensionality reductionAaa ped-17-Unsupervised Learning: Dimensionality reduction
Aaa ped-17-Unsupervised Learning: Dimensionality reduction
 
K mean-clustering
K mean-clusteringK mean-clustering
K mean-clustering
 
Implementation of K-Nearest Neighbor Algorithm
Implementation of K-Nearest Neighbor AlgorithmImplementation of K-Nearest Neighbor Algorithm
Implementation of K-Nearest Neighbor Algorithm
 
Lda
LdaLda
Lda
 
Clustering-dendogram.pptx
Clustering-dendogram.pptxClustering-dendogram.pptx
Clustering-dendogram.pptx
 
K means clustering
K means clusteringK means clustering
K means clustering
 
Principal component analysis and lda
Principal component analysis and ldaPrincipal component analysis and lda
Principal component analysis and lda
 
PosterPresentations.com-3 6x48-Template-V5 - 副本
PosterPresentations.com-3 6x48-Template-V5 - 副本PosterPresentations.com-3 6x48-Template-V5 - 副本
PosterPresentations.com-3 6x48-Template-V5 - 副本
 
Shriram Nandakumar & Deepa Naik
Shriram Nandakumar & Deepa NaikShriram Nandakumar & Deepa Naik
Shriram Nandakumar & Deepa Naik
 
Fessant aknin oukhellou_midenet_2001:comparison_of_supervised_self_organizing...
Fessant aknin oukhellou_midenet_2001:comparison_of_supervised_self_organizing...Fessant aknin oukhellou_midenet_2001:comparison_of_supervised_self_organizing...
Fessant aknin oukhellou_midenet_2001:comparison_of_supervised_self_organizing...
 
S1 pn
S1 pnS1 pn
S1 pn
 
Aplicaciones de espacios y subespacios vectoriales en la carrera de tecnologi...
Aplicaciones de espacios y subespacios vectoriales en la carrera de tecnologi...Aplicaciones de espacios y subespacios vectoriales en la carrera de tecnologi...
Aplicaciones de espacios y subespacios vectoriales en la carrera de tecnologi...
 
k-mean-clustering.ppt
k-mean-clustering.pptk-mean-clustering.ppt
k-mean-clustering.ppt
 
k-mean-Clustering impact on AI using DSS
k-mean-Clustering impact on AI using DSSk-mean-Clustering impact on AI using DSS
k-mean-Clustering impact on AI using DSS
 
Lecture_3_k-mean-clustering.ppt
Lecture_3_k-mean-clustering.pptLecture_3_k-mean-clustering.ppt
Lecture_3_k-mean-clustering.ppt
 

Recently uploaded

Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 

Recently uploaded (20)

Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 

Designing a Minimum Distance classifier to Class Mean Classifier

  • 1. Designing a Minimum Distance to Class Mean Classifier Dipesh Shome Department of Computer Science and Engineering Ahsanullah Univarsity of Science and Technology Dhaka, Bangladesh 160204045@aust.edu Abstract—Minimum distance to mean classifier is classifica- tion process in which the mean point is calculated for known classes.Then unknown classes are assigned to the class which is arithmetically closest to the mean value of a class. In this experiment, we use linear discriminant function to classify test data.Then plot decision boundary and found accuracy of 85/ Index Terms—minimum distance classifier,linear discriminant function,decision boundary I. INTRODUCTION In minimum distance classifier to mean class, training is done using the feature vector of known class.Each class is denoted by its mean vector.Then mean of the feature vectors for the object within the class is calculated. When unknown sample come, the sample is classified by measuring the closest mean vector.It is a simple classification and used to classify unclassified sample when distribution of the classes form spherical shape. II. EXPERIMENTAL DESIGN / METHODOLOGY A. Description of the different tasks: Two-class set of prototypes have to be taken from “train.txt” and “test.txt” files. Task 1: Plot all sample points (train data) from both classes, but samples from the same class should have the same color and marker. Task 2: Using a minimum distance classifier with respect to ‘class mean’, classify the test data points by plotting them with the designated class-color but a different marker. Use the Linear Discriminant Function given below. Also, plot the class means. gi(X) = X| Ȳi − 1 2 Ȳi | Ȳi Task 3:Draw the decision boundary between the two classes. Task 4:Find accuracy. B. Implementation 1) Plotting of all sample data of train data: Here we have a training dataset which is consist of 12 samples belong to two different classes. First task is to plot all the data point of both class.For plotting we import two python library: Numpy and Matplotlib. Scatter plot function and marker were used to plot the samples from same classes with same color. Train class 1 is plotted using dot(.) marker with red color and train class 2 is plotted using star(*) marker with blue color.Finally, we legend the plot and the plotted figure is given in Fig.1. Fig. 1. Sample point Plotting 2) Test data classification and calculating the distance from mean of each class using Linear discriminant function: In task 2, First we calculate the mean of each class and plot with same class color.The mean point of class 1 is represented by marker ’1’ with red color and Class 2 mean point is represented in ’D’ with blue color. Then calculate the distance from the mean of each class for each test sample using the Linear discriminant function. gi(X) = X| Ȳi − 1 2 Ȳi | Ȳi I modified the discriminant function for my task and for two class the discriminant function became, g1(X) = ¯ w1 | x − 1 2 ¯ w1 | ¯ w1 g2(X) = ¯ w2 | x − 1 2 ¯ w2 | ¯ w2 Decision Rule for classify test data is as,if g1(X) > g2(X) then, X belongs to class 1
  • 2. else X belongs to class 2 Fig. 2. Decision Boundary plotting 3) Decision boundary drawing between two classes: For decision boundary drawing, i consider all the possible point within the range as those points maintain equal distance from both classes.Then i used the maximum and minimum value of x to calculate y using the following function for drawing boundary line between two class g1(x) = g2(x) = ¯ w1 | x − 1 2 ¯ w1 | ¯ w1 − ¯ w2 | x + 1 2 ¯ w2 | ¯ w2 = ( ¯ w1 | − ¯ w2)x − 1 2 ( ¯ w1 | ¯ w1 − ¯ w2 | ¯ w2) Now we can consider it as linear equation to determine the decision boundary: ( ¯ w1 | − ¯ w2)x − 1 2 ( ¯ w1 | ¯ w1 − ¯ w2 | ¯ w2) = 0 Where ( ¯ w1 | − ¯ w2) is coefficients and 1 2 ( ¯ w1 | ¯ w1 − ¯ w2 | ¯ w2) is constant.The final equation is look like y = coefficient1 ∗ x + constant coefficient2 After plotting the x and y values, a straight line equation is created with red dot which represent the decision boundary between two class. III. RESULT ANALYSIS Test data is consist of seven sample points and two classes.six out seven data point is correctly classified using minimum distance classifier and all the training sample is classified correctly.So, we can say that accuracy is 85/ Fig. 3. Plotting of mean of the classes and test data using minimum distance classifier with respect to class mean IV. CONCLUSION In this experiment, i tried to implement a simple minimum distance to class mean classifier without complex mathe- matical calculation.Here, some sample classified accurately and some classified wrongly but the calculation speed is too faster.The limitation of this classifier is its accuracy rate is comparatively lower in nonlinear dataset as the decision boundary between two class is linear V. ALGORITHM IMPLEMENTATION / CODE
  • 3. REFERENCES [1] Vladimir Curic,“Classification Slide,” [2] Minimum Distance Classifier, ”http://sar.kangwon.ac.kr/etc/rsnote/rsnote/cp11/cp11− 6.htm : : text = The