# Context-Based Geodesic Dissimilarity Measure for Clustering Categorical Data
## 4 Results
### Comparative Study Using Real-Life Datasets
In our study, since the main contribution that we intend to make is to investigate the potential of using our proposed dissimilarity measure, we assume that the class information and class correspondence of the observations are already known, and the number of true clusters \(K\) is known to be equal to the number of true classes. In [39], they compared five external validity measures (namely Rand index, Jaccard index, Folkes-Mallows index, Rogers-Tanimoto index and Kulczynski index) to observe the performance of different clustering validity measures as the number of attributes increased for the same algorithm when others such as the number of instances and the number of classes were almost invariant. As a conclusion, the external validity measures were all consistent [39]. The authors reported that all of the external validity measures produced different values but the same ranks. In the same manner as in [39], we applied all five external validity measures (Rand index, Jaccard index, Folkes-Mallows index, Rogers-Tanimoto index and Kulczynski index) for our comparison study, as shown in Table 6. The results were consistent with [39], that is, the ranks of each dissimilarity measure were identical no matter which external validity measure is used. Therefore, here we explain only the Rand index among the external validity measures, which is the most popular external validity measure. The Rand index (RI) [40] has been widely used to calculate the clustering performance [41; 42; 43]. The RI is basically a measure of the similarity between two clusterings \begin{table}
\begin{tabular}{l c c c c} \hline \hline  & **Breast Cancer** & **Soybean** & **Lymphography** & **Mushroom** \\ \hline Number of Nodes & 683 & 562 & 148 & 5644 \\ Number of Nominal variables & 4 & 30 & 15 & 22 \\ Number of Ordinal variables & 5 & 5 & 3 & 0 \\ Number of Classes & 2 & 15 & 4 & 2 \\ Dependency factor (\(\rho(\mathbf{x})\)) & 100\% & 61.18\% & 47.76\% & 97.62\% \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Dataset information including the dependency factor. results. Let us assume that two clustering results share a cluster membership; then the similarity between two clustering results is calculated as follows  
\[RI=\frac{a+b}{(\frac{n}{2})}, \tag{10}\]  
where \(a\) is the number of pairs of nodes with the common cluster memberships, \(b\) is the number of pairs of nodes with nonidentical cluster memberships, and \(n\) is the number of nodes. The RI has a value of 0-1, where 0 implies that the two results do not agree on any pair of clustering memberships, and 1 indicates that the two clustering memberships are exactly identical. If the dataset has a true cluster membership, this true cluster membership becomes a reference membership. Therefore, the RI evaluates the agreement between the true cluster membership and the PAM clustering results [44]. A large RI indicates that the true cluster membership can be correctly recovered by the PAM clustering results. To apply the PAM with a geodesic distance framework such as the GGD and the proposed CGD, two parameters must be predetermined, such as the parameter \(k\) for the mutual \(k\)-nearest neighbor graph construction and \(K\) for the number of clusters. As mentioned earlier, we assumed that the number of true clusters \(K\) is known to be equal to the number of true classes. However, there is no concrete guideline for selecting the optimal parameters \(k\). Hence, we attempted to heuristically decide only the parameter \(k\), in a similar manner used in [PERSON] and [PERSON] [14]. They varied the values of \(k\) from 3 to 30 and determined the parameter \(k\) that yielded the best performance. Thus, we focus on only determining a proper \(k\) that yields the largest RI while varying the values of \(k\). In our study, the RI was calculated by changing \(k\) from 3 to 60.