 

Ulam Distance for Ordinal Variables
The algorithm to compute Ulam distance is to count the minimum number of operation “ DeleteShiftInsert ”:
Example: We have ask two persons, A and B about their preference on public transport and here is their ordering vector A = [Bus, Van, Train] and B =[Van, Bus, Train] Suppose we use vector A = [Bus, Van, Train] as patternvector and vector B=[Van, Bus, Train] as disordervector. Diagram below shows only single “interchange” operation is needed to transform disordervector into patternvector. Thus, the Ulam distance of preference between A and B is 1
Example: Suppose we have two judges (A and B) who give rank of importance over 6 products. The ranking vector is given as follow A=[1, 2, 3, 4, 5, 6] and B = [2, 5, 3, 1, 4, 6]. We want to measure Ulam distance between A and B We set rank vector A as patternvector and vector B as disordervector. Our goal is to count the minimum number of steps of operation “ Interchange ” of any pair to make disordervector into patternvector. Diagram below show the steps. Since we count two number of the operation “DeleteShiftInsert”, thus the Ulam distance between A and B is 2.
Preferable reference for this tutorial is Teknomo, Kardi. Similarity Measurement. http:\\people.revoledu.com\kardi\ tutorial\Similarity\




© 2006 Kardi Teknomo. All Rights Reserved. Designed by CNV Media 