# Affinity Propagation Clustering Using Path Based Similarity
## 3 Results
### Results on UCI Datasets  
In this section, we conduct two kinds of experiments on UCI datasets [25]. In Section 3.2.1, we compare APC-PS with original APC [8], pAPC [21], APCGD [22], \(k\)-means [28], expectation maximization (EM) [29; 30] and subspace sparse clustering (SSC) [31] to study the effectiveness of APC-PS. In the following experiments, \(\lambda\) for APC, APC-PS, pAPC and APCGD is set as 0.9, \(k\) for APC, APC-PS, pAP, APCGD, SSC, \(k\)-means and EM is fixed as the number of ground truth labels. For APCGD, the number of nearest neighbors and \(\varepsilon\) is predefined based on the scale of dataset. The number of nearest neighbors is 10 for Balance, Glass, Synthetic, and 20 for Mushroom. \(\varepsilon\) for APCGD is set as 5 on Balance, Glass, Synthetic, and is 10 on Mushrooms. We investigate the influence of different input values of \(p\) for APC-PS and APC in Section 3.2.2. These experiments are involved with four UCI datasets, Balance scale, Glass identification, Synthetic control chart time series and Mushrooms datasets. Detail information of these four datasets is listed in Table 1.  
Two evaluation metrics are adopted to evaluate the quality of clusterings, _F-measure_[32; 33] and Fowlkes-Mallows Index (_FMI_) [34]. F-measure is the harmonic average of precision (_Prec_) and recall (_Rec_). Suppose \(n\) samples are categorized by \(l\) classes and grouped into \(k\) clusters by a clustering algorithm. \(\mathcal{C}=\{\mathcal{C}_{1},\mathcal{C}_{2},\cdots,\mathcal{C}_{k}\}\) and \(\mathcal{C}_{k^{\prime}}\) represents the set of samples in the \(k^{\prime}\)-th (\(k^{\prime}\in\{1,2,\cdots,k\}\)). The precision for \(l^{\prime}\)-th class (\(l^{\prime}\in\{1,2,\cdots,l\}\)) and \(\mathcal{C}_{k^{\prime}}\) is \(Prec(l^{\prime},\mathcal{C}_{k^{\prime}})=\frac{n_{l^{\prime}l^{\prime}}}{n _{l^{\prime}}}\), and recall is \(Rec(l^{\prime},\mathcal{C}_{k^{\prime}})=\frac{n_{l^{\prime}l^{\prime}}}{n _{l^{\prime}}}\). \(n_{k^{\prime}}\) is the number of samples in cluster \(k^{\prime}\), \(n_{l^{\prime}}\) is the number of samples labeled with \(l^{\prime}\) and \(n_{l^{\prime}l^{\prime}}\) is the number of samples whose label is \(l^{\prime}\) and assigned to cluster \(k^{\prime}\). The FMeasure between class \(l^{\prime}\) and cluster \(k^{\prime}\) is:  
\[{measure(l^{\prime},\mathcal{C}_{k^{\prime}})=\frac{Prec(l^{\prime},\mathcal{C }_{k^{\prime}})\times Rec(l^{\prime},\mathcal{C}_{k^{\prime}})}{Prec(l^{ \prime},\mathcal{C}_{k^{\prime}})+Rec(l^{\prime},\mathcal{C}_{k^{\prime}})}} \tag{10}\]  
The overall F-measure of \(\mathcal{C}\) is:  
\[F(\mathcal{C})=2\times\sum_{l^{\prime}=1}^{l}\frac{n_{l^{\prime}}}{n}max_{ \mathcal{C}_{k^{\prime}}\in\mathcal{C}}({measure(l^{\prime},\mathcal{C}_{k^{ \prime}})}) \tag{11}\]  
FMI is another commonly-used metric for clustering [34] and defined as:  
\[{FMI}=\sqrt{\frac{a}{a+b}\times\frac{a}{a+c}} \tag{12}\]  
where \(a\) is the number of samples of the same label and grouped into the same cluster, \(b\) is the number of samples of the same label but grouped into different clusters, and \(c\) is the number of samples of different labels but grouped in the same cluster.