# Learning-Based Dissimilarity for Clustering Categorical Data
## 5 Findings and Discussion  
In our study, we used KMeans++ [15], as implemented in the Weka toolbox for machine learning and data science [21]. We slightly modified it so that, apart from \(k\) (the target number of clusters to form), it is given the dissimilarity relation as an input parameter. For each dissimilarity measure, we executed KMeans++ in all datasets, as explained previously, and computed the F-measure and Adjusted Rand Index. In passing, we note that, on any application of KMeans++, we used _inputting_; that is, for every dataset, any time we found that a value was missing for an object attribute, we set that value to be the mode of that object attribute. Figure 2 provides, via a box plot, a graphical description for each group of F-measures, one for every dissimilarity relation under study. In general, the greater the median of a group of F-measures, the better the associated dissimilarity relation; a similar remark applies when the size of the box is short and when the box appears closer to the right-hand side of the figure. Note how, in particular, Learning-Based Dissimilarity appears right at the top of the figure and most to the right. While this looks like a good first impression for our proposed method, we must stand on a sound, statistical method if we are to draw strong conclusions. We used the Wilcoxon signed-rank test [22] to conduct a one-to-one comparison of Learning-Based Dissimilarity against all the other dissimilarity measures under investigation. Table 5 summarizes our comparison results: on each row, we display a dissimilarity measure, the median, and the standard deviation of the group of F-measures output by KMeans++ for it, and the \(p\)-value output by the Wilcoxon signed-rank test, rejecting the null hypothesis. From this, we conclude that the results of K-Means++ are significantly better when using Learning-Based Dissimilarity according to F-measure. In an attempt to show that the above result holds independently of what performance measure is used, we ran a similar experiment but this time using the Adjusted Rand Index [17]. As in Figure 2, Figure 3 provides a box plot for each group of Adjusted Rand Index measures, one for every dissimilarity relation under study. Boxes are to be compared similarly as before. Again, note how, in particular, Learning-Based Dissimilarity appears right at the top of the figure and most to the right. In addition, we proceed similarly relying on the statistical method so as to draw strong conclusions. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Dissimilarity** & **Median F-Measure** & **Standard Deviation** & \(p\)**-Value** \\ \hline Learning-Based Dissimilarity & 0.4516 & 0.1780 & - \\ Eskin & 0.4371 & 0.2074 & 0.0001 \\ Lin & 0.4353 & 0.2028 & \textless{}0.0001 \\ Occurrence Frequency & 0.4352 & 0.1893 & \textless{}0.0001 \\ Euclidean & 0.4347 & 0.1754 & \textless{}0.0001 \\ Manhattan & 0.4335 & 0.2007 & \textless{}0.0001 \\ Inverse Occurrence Frequency & 0.4160 & 0.1749 & \textless{}0.0001 \\ [PERSON] & 0.4088 & 0.1760 & \textless{}0.0001 \\ [PERSON] & 0.4077 & 0.2008 & 0.0266 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Statistical results, according to F-measure [16], for KMeans++ using all the dissimilarity measures, considering all the tested datasets. The last column corresponds to the \(p\)-value obtained when comparing Learning-Based Dissimilarity against the other dissimilarity measures using the Wilcoxon signed-rank test [22]. The results are sorted from top to bottom in descending order of the associated F-measure group median. Figure 2: Box and whisker diagrams of all groups of F-measures [16]. Each F-measure group is associated with a dissimilarity measure and gathers the output of KMeans++ [15] having made a run on every dataset selected for our experimentation. Box and whisker diagrams are shown following a descending ordering, considering the associated F-measure median.