A similarity algorithm for categorical variables

How to measure the similarity of data objects is one of the most important problems in the data analysis. This paper proposes a method which uses only information of the distribution of attributes to measure the similarity between nominal data objects. In this algorithm, we made the logarithm form of the conditional probability the main interest, because we think that the distribution information is the only information that a dataset can tell us without domain knowledge. First we calculate conditional probability of the target data objects and every other attributes. Then we turn them into logarithm form and sort by the data objects. In last step, we use the average value of each attribute column to compose the feature vector of data objects, and the Euclidean distance will be the similarity metrics between the data objects. The experiments on extensive UCI data sets based on the derived similarity metrics will show the considerable accuracy.