# Double-Constraint Fuzzy Clustering Algorithm
## 4 Experiment
### Clustering Results  
The clustering results were assessed using three indices: accuracy, the number of data points in each cluster, and runtime. Accuracy was determined by the percentage of correctly partitioned data points in each dataset. The total number of incorrectly partitioned data points in each cluster was determined using the following index:  
\[sum=\sum_{i=1}^{c}\left|\left|C_{i}^{1}\right|-\left|C_{i}^{2}\right|\right|/n. \tag{18}\]  
where \(\left|C_{i}^{1}\right|\) and \(\left|C_{i}^{2}\right|\) are the actual and the computed numbers of data in the \(i\)th cluster, respectively. On the other hand, according to CFCM, the weighting value of the \(j\)th data point \(q_{j}\) is determined by its density as  
\[q_{j}=\rho_{j}/(\sum_{k=1}^{n}\rho_{k}/n),\ s.t.,\ \rho_{j}=(\sum_{k^{c}N(x_{j})} \left|\left|x_{k}-x_{j}\right|\right|)^{-1},j=1,2,\ldots,n. \tag{19}\]  
where \(N(x_{j})\) is the set of neighboring data points around \(x_{j}\) and \(\left\|\cdot\right\|\) denotes the distance between any pair of points. All clustering results are presented in Table 2 and the clustering centers of Sets 1-4 are shown in Figure 1. According to clustering _accuracy_ and _Sum_, we compared four clustering algorithms: FCM, PCM, CFCM, and DFCM. In these algorithms, all fuzziness exponents are uniformly taken as 1.5 and the stop error are \(10^{-3}\). In the four synthetic datasets, Figure 1 illustrates that the cluster centers derived from FCM deviate from the actual centers. This deviation is attributed to FCM's limited capacity to discern the typicality or compatibility of points for effective clustering. Contrary to FCM, DFCM was able to determine the clustering centers more accurately. Table 3 presents a detailed comparative analysis of the four clustering algorithms. In terms of clustering \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**No.** & **Dataset** & \(n\) & \(dim\) & \(c\) & \\ \hline
1 & _Iris_ & 3 & 4 & 150 & 50/50/50 \\
2 & _Seeds_ & 3 & 7 & 210 & 70/70/70 \\
3 & _Tea_ & 3 & 5 & 151 & 49/50/52 \\
4 & _Breast_ & 6 & 9 & 106 & 21/15/18/16/14/22 \\
5 & _Cancer_ & 2 & 9 & 683 & 444/239 \\
6 & _Wholesale_ & 2 & 7 & 440 & 298/142 \\
7 & _Appendicitis_ & 2 & 7 & 106 & 21/85 \\
8 & _Wisconsin_ & 2 & 9 & 699 & 444/239 \\ \hline \hline \end{tabular} Notes: The symbols \(``n\"\), \(``dim\"\), and \(``c\"\) are the number of data points, dimension, and the number of clusters in each dataset, respectively.  
\end{table} 
Table 1: Characteristics of 8 actual datasets from UCI. accuracy, DFCM surpasses the other three algorithms, with CFCM ranking the second and FCM achieving the lowest accuracy. The results demonstrate that DFCM is effective and valuable. The incorporation of dual constraints in DFCM enhances the accuracy of the clustering centers and the corresponding membership degrees. In contrast, PCM and CFCM exhibit slight deviations, whereas DFCM demonstrates negligible deviations. Hence, the value of \(Sum\) of DFCM is the lowest among the three algorithms. PCM and CFCM rank as intermediate, while FCM has the highest value. Furthermore, the value of \(Sum\) derived from CFCM is nearly the same as DFCM, as shown in Table 2. However, FCM has the shortest runtime when the number of clusters is fixed, and both PCM and DFCM depend on FCM due to their initialization processes. In the eight real datasets, Table 2 shows that DFCM outperformed the other three algorithms in five of the datasets, whereas it failed in terms of \(A\) and \(Sum\) in the remaining three. However, the clustering results of DFCM is very close to the best results of the three datasets. Hence, DFCM exhibits a slight superiority compared to the other three algorithms. Our conclusions based on these results are as follows: Firstly, most clusters in these eight datasets are non-spherical, but the four algorithms can in principle work well only with datasets with spherical clusters. Secondly, the complex structures of the eight datasets result in a generally low clustering accuracy of any clustering algorithm applied.