# Majority Voting Based Multi-Task Clustering of Air Quality Monitoring Network in Turkey
## 4 Multi-task Clustering  
A _task_ is generally referred to the construction of a model using a specific dataset for a single target or for a sub-goal. In this sense, _\"multiple tasks\"_ could mean the modeling of multiple output targets simultaneously by using task-related datasets and by considering task relations. Depending on the definition of \"multiple tasks\", we can define multi-task clustering as follows: _multi-task clustering_ (MTC) is a process of generating global clusters that are shared by the multiple related tasks. MTC is desired to merge information among tasks to improve the clustering performance of individual tasks. The most important aspect in MTC is to discover the shared information among tasks. In this paper, a novel algorithm, named Majority Voting based Multi-task Clustering (MV-MTC), is proposed to provide this aspect. Consider the unlabeled dataset \(D=\{o_{1}\), \(o_{2}\),..., \(o_{n}\}\) where each \(o_{i}\) represents an object as a \(p\)-dimensional explanatory variable and \(n\) is the number of objects (instances) in the dataset. Assume that the problem domain consists of \(r\) different tasks \(T=\{t_{1},t_{2},\ldots,t_{r}\}\), each of which is represented as \(t_{i}\). In the first step of the algorithm, the instance set allotted to each task should be properly clustered using one of the traditional clustering algorithms. For \(r\) different tasks, let us denote the resulting clustering assignments as \(C=\{C_{t_{1}}\), \(C_{t_{2}}\),..., \(C_{t_{r}}\}\) where \(C_{t_{i}}=\{c_{1}\), \(c_{2}\),..., \(c_{k}\}\) for the predetermined number of clusters as \(k\) and each \(c_{i}\) consists of different \(o_{i}\)s from the dataset \(D\). To take the joint decision from all \(C_{t_{i}}\)s, a common factor should be determined because the same cluster names do not have to represent the same clustering structure among the task groups. We need to determine common cluster labels meaning the same information through all tasks. In this context, after clustering instances of each task by one of the single clustering algorithms, all clusters are labeled from the common label set \(L=\{L_{1},L_{2},\ldots,L_{k}\}\) as in Table 3 in terms of the mean weights of intra-cluster objects and \(k\) cluster labels for \(k\) clusters are produced according to the cluster weights. To illustrate if we have three clusters, the heaviest one, the medium one and the lightest one can be labeled as \"\(L_{3}\)\", \"\(L_{2}\)\" and \"\(L_{1}\)\", respectively. The same procedure is applied for \(r\) tasks. As shown in the following example, all instances in the dataset are labeled with a suitable cluster label \(L_{i}\) for each task \(t_{i}\). As the final stage, as in the majority voting approach, the most common cluster label among all tasks for a given instance \(o_{i}\) is selected as the final cluster assignment. Therefore, the novel MTC algorithm is called Majority Voting based Multi-task Clustering (MV-MTC). \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Instance**} & **Cluster Label** & **Cluster Label** & & **Cluster Label** & **Cluster Label** \\  & **Assignments** & **Assignments** &... & **Assignments** & **Assignments** \\  & **for \(t_{1}\)** & **for \(t_{2}\)** & & **for \(t_{r-1}\)** & **for \(t_{r}\)** \\ \hline \(o_{1}\) & \(L_{1}\) & \(L_{2}\) &... & \(L_{k-1}\) & \(L_{k}\) \\ \(o_{2}\) & \(L_{2}\) & \(L_{k}\) &... & \(L_{k-1}\) & \(L_{3}\) \\... &... &... &... &... &... \\ \(o_{n-1}\) & \(L_{k}\) & \(L_{2}\) &... & \(L_{1}\) & \(L_{4}\) \\ \(o_{n}\) & \(L_{1}\) & \(L_{k-2}\) &... & \(L_{k-1}\) & \(L_{k}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Assignments of cluster labels under different tasks. This study proposes two novel concepts: single-task clusters and multi-task clusters. In the first phase, the proposed algorithm discovers local clusters (_single-task clusters_) from each task data separately, and, in the second phase, these local clusters are combined to produce the global result (_multi-task clusters_).