A distance metric for ordinal data based on misclassification - Nielsen, Dreas (Journal of Innovative Applied Mathematics and Computational Sciences, 2024)
Distances between data sets are used for analyses such as classification and clustering analyses. Some existing distance metrics, such as the Manhattan (City Block or L1 ) distance, are suitable for use with categorical data, where the data subtype is numeric, or more specifically, integers. However, ordinality of categories imposes additional constraints on data distributions, and the ordering of categories should be considered in the calculation of distances. A new distance metric is presented here that is based on the number of misclassifications that must have occurred within one data set if it were in fact identical to another data set. This "misclassification distance" is equivalent to the number of reclassifications necessary to transform one data set into another. This metric takes account not only of the numbers of observations in corresponding ordinal categories, but also of the number of categories across which observations must be moved to correct all misclassifications. Each stepwise movement of an observation across one or more categories that is required to equalize the distributions increases the distance metric, thus this method is referred to as a stepwise ordinal misclassification distance (SOMD). An algorithm is provided for the calculation of this metric.