Overview:
-
The Dice dissimilarity between two vectors i and j containing Boolean elements is given by b+c/2a+b+c.
-
When compared with Jaccard dissimilarity the denominator of Dice dissimilarity differs in the weightage given to component a. In case of Dice the dissimilarity decreases more when both the objects have the same properties present. Dice gives double weightage to the binary combination 11 for both the objects.
-
The contingency table for two vectors having binary variables is formed by
Example:
The example finds the Dice dissimilarity between Crane and Polar bear. Dice gives double the weightage to the fact that both Crane and Polar bear feed on fish and both are white in colour.
# Example Python program that computes the Dice dissimilarity features_crane = [1, 1, 1, 0, 1] # Find Dice dissimilarity # Find Jaccard dissimilarity to compare with Dice dissimilarity |
Output:
Dice dissimilarity between crane and polar bear:0.33 Jaccard dissimilarity between crane and polar bear:0.5 |