## 4 Data-Science Analytics
### Goal 1--Cluster Identification  
In **G1** we addressed the first issue. In our approach, the user performs cluster identification in the 3D space of previously selected features. The user has access to 3D scatter plot of the points in this space and manually annotates data with cluster labels. During this phase, implicitly, the user detects a noise, which is not assigned to any of the created clusters. We aimed at improving this stage by providing the user with an option of automatic cluster identification in a selected 3D space. In order to do that, we tested multiple clustering algorithms from the _sklearn_ library [28] are evaluated them in the first approach against true cluster labels that we obtained from experts. Table 1 contains a comparison of tested algorithms in terms of homogeneity (each cluster contains only members of a single class), completeness (all members of a given class are assigned to the same cluster), and V-measure (harmonic mean of homogeneity and completeness) [29]. This allowed us to select potential candidates for further research and discard methods that did not perform well. The main challenge in the data was that it contained noise, which is not handled well by most of the clustering algorithms. This narrowed us to three main clustering algorithms: DBSCAN [6], OPTICS [5], and Affinity Propagation [7] as they can handle noise by design. The results of the clustering sample dataset with these algorithms are presented in Figure 2.  
The most important parameters that the user needs to specify in order to obtain correct results are \(\epsilon\) and \(min\_samples\). First, define the maximal distance between points in order to merge them into one cluster. The latter defines how many points are required to form a cluster. These parameters have to be defined by the user either as a trial of tests, or with expert knowledge about the data characteristics such as noise density, cluster densities, or upper and lower bound of the possible number of clusters. In this paper, we used fixed values for all the datasets in order not to distract the user from the main evaluation goal. Our primary aim in integrating machine learning with human interaction was to assist and not to replace the user. Hence, the clustering has to be made on the three IPCP dimensions selected by the user. Applying clustering algorithms to the whole dataset could result in cluster assignments that are not intuitive to the user as it does not align with clusters visible in 3D scatter plots. It does not mean that the clustering is incorrect, but it violates the primary goal of assisting the users in their decisions, not altering them. Nonetheless, we performed tests of clustering dataset in all the dimensions, and after dimensionality reduction with the usage of Principal Component Analysis (PCA) [30]. This approach is based on lossy transformation to low-dimensional space by selecting new features defined by vectors along which the dataset exhibits the highest variance and discarding those with low variance levels. We obtained similar results as in the case of clustering in 3D if the user selected the correct criterion. In instances where clusters cannot be approximated with the usage of 3D scatter plots, approaches that apply clustering in the entire feature space may be more \begin{table}
\begin{tabular}{l c c c} \hline
**Algorithm** & **V-Measure** & **Homogeneity** & **Completeness** \\ \hline Gaussian Mixture & 0.55 & 0.50 & 0.62 \\ \hline Spectral Clustering & 0.13 & 0.09 & 0.24 \\ \hline Agglomerative Clustering & 0.55 & 0.50 & 0.62 \\ \hline Affinity Propagation & 0.59 & 0.70 & 0.50 \\ \hline Mean Shift & 0.17 & 0.13 & 0.23 \\ \hline Birch & 0.13 & 0.09 & 0.24 \\ \hline OPTICS & 0.58 & 0.54 & 0.61 \\ \hline DBSCAN & 0.78 & 0.78 & 0.78 \\ \hline \end{tabular}
\end{table} 
Table 1: Comparison of clustering algorithm on sample dataset with known cluster labels assignment. The higher the value, the better. The comparison was done over the **DS1** as it contained the data labeling required by the used metrics.