This simple exercise shows the calculation of the Jaccard coefficient in a sample dataset.
Pathological Test Results
The table shows the pathological test results for three individuals.
Name | Gender | Fever | Cough | Test-1 | Test-2 | Test-3 | Test-4 |
---|
Jack | M | Y | N | P | N | N | A |
Mary | F | Y | N | P | A | P | N |
Jim | M | Y | P | N | N | N | A |
Jaccard Coefficient Calculations
Given:
Jaccard(A,B)=Total Number of IndicatorsNumber of Common Positive Indicators
Pair (Jack, Mary)
Difference of observations in both:
(Jack∩Mary)={Test-3}=1
Total Attributes:
(Jack∪Mary)={Fever, Cough, Test-3}=3
Jaccard Coefficient:
J(Jack,Mary)=31=0.33
Pair (Jack, Jim)
Difference of observations in both:
(Jack∩Jim)={Cough, Test-1}=2
Total Attributes:
(Jack∪Jim)={Fever, Cough, Test-1}=3
Jaccard Coefficient:
J(Jack,Jim)=32=0.67
Pair (Jim, Mary)
Difference of observations in both:
(Jim∩Mary)={Cough, Test-1}=2
Total Attributes:
(Jim∪Mary)={Fever, Cough, Test-1, Test-2, Test-3, Test-4}=6
Jaccard Coefficient:
J(Jim,Mary)=61=0.17