# Simple K-Medoids Partitioning Algorithm for Mixed Variable Data
## 3 Demonstration on Artificial and Real Datasets
### Real Datasets
#### 3.2.6 Credit Approval Data  
The Credit approval data have 653 objects (without NA) assigned to two classes. This dataset is mixed variables with six numerical and nine categorical variables. The seven GDFs were applied in the credit approval data. The maximum clustering accuracy index was 82.7% for the Marweco GDF. For this dataset, the author of [13] listed the clustering accuracy of other algorithms such as the k-prototype (56.2%), similarity-based agglomerative clustering (SBAC) (55.5%), KL-FCM-GM (Kullback-Leibler fuzzy c-means Gauss multinomial) (57.4%), and k-prototype for the mixed and categorical variables (77.9%) [13].  
Table 8 shows that the SKM had better performances in all real datasets. Notice that the other algorithms in Table 8 may apply a different distance method. The SKM algorithm in the Iris dataset, for instance, applied the Canberra GDF that was compared to the k-means and k-prototype with the Euclidean distance. Although it appeared to be an unfair comparison due to the different GDF (distance) selections, our comparison emphasized the GDF's advantage in its combinations of the distances and weights.  
The flexible combinations of the distances are an important feature of the GDF. While there are many alternatives for numerical, binary, and categorical distances, the mixed variable distances have few options. The more variations in the mixed variable distance are of the utmost importance due to the distance function exerting a major effect on a partitioning algorithm's result [35], i.e., different distances producing different optima. Hence, with the GDF's flexibility, various distance combinations  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Dataset** & **Type** & **SKM** & **Other Algorithms** \\ \hline Iris & Numerical & 95.3 & 94.7 [6] \({}^{a}\), 82.2 [13] \({}^{b}\) \\ Wine & Numerical & 92.7 & 70.3 [19] \({}^{c}\) \\ Soybean & Categorical & 100 & 91.0 [13] \({}^{b}\), 81.0 [16] \({}^{d}\) \\ Vote & Categorical & 87.8 & 86.7 [6] \({}^{a}\) \\ Zoo & Mixed & 82.2 & 78.7 [19] \({}^{c}\) \\ Credit approval & Mixed & 82.7 & 77.9 [13] \({}^{b}\) \\ \hline \hline \end{tabular} \({}^{a}\) k-means for mixed and categorical variables, \({}^{b}\) k-prototype for mixed and categorical variables, \({}^{c}\) rank k-medoids, \({}^{d}\) SFKM.  
\end{table}
Table 8: Clustering accuracy (in percent) of the real datasets.  
and weights can be simply applied. The Esimma and Marweco GDFs were the two GDF examples that were applied showing the GDF benefit.  
Due to the linear combination of the numerical, binary, and categorical variables independently, another advantage of the GDF is that each distance class can be also canceled out when a class variable is excluded in a dataset. If a dataset only consists of numerical variables, for instance, the distance involved is only a numerical distance by eliminating the binary and categorical distances. The Canberra GDF in the Iris data, for example, emerged because the binary and categorical distances were omitted.  
An adjustable weight to set a different contribution of an individual variable is the last advantage of the GDF. While the GDF had a scalar (constant) weight for \(\alpha\), \(\beta\), and \(\gamma\), it can be replaced by a vector of weights. The vector of weights implies that each variable has its own contribution to the distance computation, i.e., the variables do not equally contribute. Unequal contributions of the variables have been applied iteratively in the subspace clustering of the k-means algorithm by updated weights [36]. If a vector of weights is applied in the GDF, on the other hand, the contribution of the variables is calculated only once compared to as many as the iterations in the updated weights. Thus, the vector of weights in the GDF is preferred in a medoid-based algorithm setting than the updated weights.