# Clustering with Nature-Inspired Algorithm Based on Territorial Behavior of Predatory Animals
## 4 Experimental Results
In our investigation, we tuned DBSCAN parameters in order to obtain the same number of clusters as for _PAA_. Table 4 contains the results of this experiment. Again, proposed algorithm is superior, in terms of higher Rand index values, for nine out of ten datasets. \begin{table}
\begin{tabular}{c c c c} \hline  & \(\overline{R}_{PAA}\) & \(\overline{R}_{\text{DBSCAN}}\) & **DBSCAN Parameters** \\ \hline wine & 0.646324 & 0.408029 & \(eps=4.7,\mathit{min\_samples}=2\) \\ glass & 0.60919 & 0.59830 & \(eps=1.35,\mathit{min\_samples}=2\) \\ anuran calls & 0.682589 & 0.749186 & \(eps=0.33,\mathit{min\_samples}=5\) \\ gestures & 0.7235056 & 0.1193016 & \(eps=2.9,\mathit{min\_samples}=5\) \\ libras & 0.856796 & 0.74157 & \(eps=0.9,\mathit{min\_samples}=4\) \\ yeast & 0.621127 & 0.394240 & \(eps=0.068,\mathit{min\_samples}=4\) \\ s1 & 0.871717 & 0.7987187 & \(eps=2840,\mathit{min\_samples}=20\) \\ s2 & 0.869067 & 0.8243575 & \(eps=2650,\mathit{min\_samples}=20\) \\ s3 & 0.840887 & 0.7602578 & \(eps=2200,\mathit{min\_samples}=20\) \\ s4 & 0.876354 & 0.7737063 & \(eps=1900,\mathit{min\_samples}=20\) \\ \hline \end{tabular}
\end{table} 
Table 4: Values of Rand index for _PAA_ and DBSCAN. Figure 2: Comparison of an irregular set clustered by the proposed algorithm (**upper figure**) and _K_-means algorithm (**bottom figure**). It is noticeable that the algorithm's behavior is controlled by multiple parameters. First of all, it requires the number of clusters \(k\) to be provided. As the algorithm has a tendency to considerably reduce sizes of final clusters, providing slightly more clusters than expected as the value of \(k\) can be beneficial. Search threshold \(t_{search}\) determines how many of the closets points are considered when creating a new point (making a 'jump'). Increasing this parameter (usually beyond 0.1) makes the algorithm less stable and allows clusters to span along larger distances. Together with \(M_{0}\) this parameter determines the chance for the cluster to form over far-reaching points, thus allowing the algorithm to cross gaps and cluster non-convex points, but also making the shape of the cluster less consistent. Values less or equal to 0.05 of this parameter could be recommended. Correction threshold \(t_{correct}\) determines how many of the closest points are considered when performing correction phase. With this parameter set to 0, the algorithm skips the correction phase. With small values (so that \(t_{correct}\)*\(N\), \(N\)-size of the set is less than 10), it only considers the closest points. Increasing this number beyond \(0.01*k\) leads to more accurate, yet potentially dangerous correction where certain clusters sizes are unproportionally increased. That is why a value of 0.1 could be recommended. After obtaining values of weights used for correction of cluster assignment for each point, the weight of other clusters are multiplied by so called correction reluctance \(\alpha\), in order to to reduce chaotic switching points between clusters that are close to each other. Setting this to 0 switches off correction phase, value of 1 makes each cluster treated equally, and raising this value above 1 makes preference for switching cluster to the current one. We have established that the value of \(\alpha=0.8\) could be preferable from the performance point of view. Number of correction runs \(CR\) determines how many times correction phase is applied. The larger this number is, the more convex and compact the clusters should be. It is due to removal of small anomalies and points belonging to the clusters outside of them. Setting this value above 1 may lead to smoothing of clusters along planes. During experimental evaluation, optimal number of correction runs \(CR\) was estimated to be equal to 1. The illustration for this fact was shown on Figure 3, which provides the average values of Rand index, obtained for 100 runs of the clustering algorithm on the anuran calls dataset.