Given a universe set E, the Hamming similarity for vectors is a function HammingSim:E^n\times E^n\longrightarrow [0,1] that measures the number of equals components, divided by the length of vectors.


where IdSim is the Identity similarity.

Examples Edit

  • HammingSim((0,1,0,1,1),(1,0,0,1,0)) = 2/5 = 0.4.
  • HammingSim((a,b,a,c,b),(b,c,a,b,a)) = 1/5 = 0.2.
  • HammingSim((a,b,c,d),(d,c,b,a)) = 0/4 = 0;

Normalization Edit

It is normalized.

Variations Edit

When the components of vectors are of different types, we have the Hamming similarity for tuples, and if vectors are of different lenght we have the Hamming similarity for sequences.

Applications Edit

Useful for comparing codes.

References Edit

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.