## 3 Proposed Ensemble Clustering
### Problem Definition  
#### 3.2.1 Production of Multiple Base Clustering Results  
The set of basic clustering results is generated based on the algorithm presented in Algorithm 1. In this pseudocode, the indices of the whole data set are first stored as \(T\), and then step-by-step, the modified kmedoids algorithm [52] is applied and the result of the clustering is stored. The \(i\)th clustering result has at least \(C_{i}\) clusters where \(C_{i}\) is a positive random integer number in the interval \(\left[2;\sqrt{|D_{:1}|}\right]\). ```
Input: \(D\), \(B\), \(\gamma\) Output: \(\mathbf{\Phi}\), Clusters
1. \(\mathbf{\Phi}=\emptyset\);
2. For \(i=1\) to \(B\)
3. \(C_{i}\) = a positive random integer number in \(\left[2;\sqrt{|D_{:1}|}\right]\);
4. \(\left[\mathbf{\phi}^{j}_{1,1},\mathbf{\phi}^{j}_{2,2},\ldots,\mathbf{\phi}^{j}_{i;C_{i}} \right]\) = FindValidCluster(\(\mathbf{D}\), \(C_{i}\), \(\gamma\));
5. EndFor
6. Clusters \(=\left[C_{1},C_{2},\ldots,C_{B}\right]\)
7. Return \(\mathbf{\Phi}\), Clusters

Figure 1: The assumptive regions (clusters) between a pair of clusters. Each base clustering result is an output of a base locally reliable clustering algorithm presented in Algorithm 2. The mentioned method repeats until the number of the objects out of the so-far reliable clusters is less than \(C^{2}\). The final cluster centers obtained at any time are extracted using a repeated method to display different sub-sets of data and also ensure that multiple clustering results are used to describe the entire data. Here, we have to explain why it determines the final conditions. Many researchers, in the research background [53; 54], argued that the maximum number of clusters in a data set should be less than \(\sqrt{|D_{:1}|}\). Thus, as soon as the number of the objects in the dataset which is out of the so-far reliable clusters is less than \(C^{2}\), we assume that the dataset can be divided no longer into \(C\) clusters. Therefore, the loop ends in that case. The time complexity of the kmedoids clustering algorithm (a version of the kmeans clustering algorithm) is \(O(|D_{:1}|C|)\), so that \(I\) is the number of iterations. It should be noted that the kmeans or kmedoids clustering algorithm is a poor learner whose function is affected by many factors. For example, the algorithm is very sensitive to initial cluster centers. So that, selection of different initial cluster centers often leads to different clustering results. In addition, the kmeans or kmedoids clustering algorithm has the tendency to find spherical clusters in relatively uniform sizes that are not suitable for data with other distributions. Therefore, we will try to provide multiple clustering results generated by the kmedoids clustering algorithm in order to create an ensemble of good clustering results over the data set, by distributing different data, instead of using a strong clustering algorithm. ```
Input: \(\mathbf{D},C,\gamma\) Output: \(\mathbf{\Phi},C\)
01. \(\mathbf{\Phi}=\mathbf{0}\); \(\Pi=\mathbf{0}\); \(T=\{1,\ldots,|D_{:1}|\}\); \(03\). counter \(=0\); \(04\). \(\text{While}\left((|T|)\geq C^{2}\right)\) \([\Pi_{1,1},\Pi_{2},\ldots,\Pi_{C}]=\text{KMedoids}(\mathbf{D}_{T,}C)\); \(06\). For \(k=1\) to \(C\) If \((\sum_{i=1}^{|D_{:1}|}\Pi_{k}\geq C)\) \(counter=counter+1\); \(\Phi_{counter}=\Pi_{k}\); \(Rem=\left\{x\in\{1,\ldots,|D_{:1}|\}\middle|R_{x}^{\Pi_{k}}=1\right\}\); \(T=T-Rem\); \(12\). EndIf \(13\). EndFor \(14\). EndWhile \(15\). \(C=counter\); \(16\). Return \(\mathbf{\Phi},C\);
```

**Algorithm 2** The FindValidCluster algorithm

#### 3.2.2 Time Complexity of Production of Multiple Base Clustering Results

The incremental method is called the kmedoids clustering algorithm, which is called the base locally reliable clustering algorithm presented in Algorithm 2.