Concept
Hamming Distance
If you are using categorical variables, then using the Hamming distance will be helpful. If two points are the same, then the difference between them is 0. If they are not the same, the difference between them is 1. Its formula is given by:
$D_H = \sum_{i=1}^k {|x_i - y_i|}$ $if x = y \Rightarrow 0$ $if x \neq y \Rightarrow 1$
0
2
Updated 2020-03-23
Tags
Data Science