# How to calculate Proximity Measure for Nominal Attributes?

 RollNo Marks Grade 1 90 A 2 80 B 3 82 B 4 90 A

Try Our Automatic tool to find proximity measure

## Pairs for distance Measurement:

 d(RollNo1,RollNo1) d(RollNo1,RollNo2) d(RollNo1,RollNo3) d(RollNo1,RollNo4) d(RollNo2,RollNo1) d(RollNo2,RollNo2) d(RollNo2,RollNo3) d(RollNo2,RollNo4) d(RollNo3,RollNo1) d(RollNo3,RollNo2) d(RollNo3,RollNo3) d(RollNo3,RollNo4) d(RollNo4,RollNo1) d(RollNo4,RollNo2) d(RollNo4,RollNo4) d(RollNo3,RollNo4)

## FormulaeÂ to calculate Proximity Measure for Nominal Attribute:

distance(object1, Object2) = P – MÂ /Â P

P is total number of attributes

M is total number of matches

So in our case we have four objects RollNo1, RollNo2, RollNo3, RollNo4

 d(1,1) =Â P – MÂ /Â P= 2Â – 2 / 2= 0 d(RollNo1,RollNo2) d(RollNo1,RollNo3) d(RollNo1,RollNo4) (2,1) =Â P – MÂ /Â P= (2Â – 0) / 2=Â 1 (2,2) =Â P – MÂ /Â P= (2Â – 2) / 2=Â 0 d(RollNo2,RollNo3) d(RollNo2,RollNo4) (3,1) =Â P – MÂ /Â P= (2Â – 0) / 2=Â 1 (3,2) =Â P – MÂ /Â P= (2Â – 1 )/ 2=Â 0.5 (3,3) =Â P – MÂ /Â P= (2Â – 2 )/ 2=Â 0 d(RollNo3,RollNo4) (4,1) =Â P – MÂ /Â P= (2Â – 2) / 2=Â 0 (4,2) =Â P – MÂ /Â P= (2Â – 0) / 2=Â 1 (4,3) =Â P – MÂ /Â P=( 2Â – 0 )/ 2=Â 1 (4,4) =Â P – MÂ /Â P=( 2Â – 2) / 2=Â 0