## 3 Data Clustering Algorithm
### Algorithm Description  
The spectral clustering algorithm is a graph-based technique to find k clusters in data [24; 25]. It calculates a similarity matrix of a similarity graph from the data to determine the Laplacian matrix. A similarity graph models the local neighborhood relationships between the data points, where the matrix representation of this graph is the similarity matrix. The similarity matrix contains pairwise similarity values between connected nodes in the similarity graph and can be represented by Laplacian matrix. This algorithm starts by representing data in a lower dimension space in which the data are classified. The reduction in data dimension is based on the eigenvectors of the Laplacian matrix. The columns of the eigenvectors correspond to the k smallest eigenvalues of the Laplacian matrix. These eigenvectors are a low-dimensional representation of the input data in a new space, where the clusters are well-separated [25]. This algorithm aims to classify data into clusters, such that the parts of data in the same cluster are similar and others in different clusters are dissimilar to each other [26]. The authors decided to use spectral clustering for their data as it can produce accurate clustering results by solving the features of the Laplacian matrix. This clustering method can be used for any shape of data, with the advantage of dealing with non-convex data distributions [27]. Since the data used in this research is mostly convex and sometimes non-convex, spectral clustering is a suitable method for unsupervised learning to detect different audiograms shapes.  
The authors started by clustering the data into seven clusters using spectral clustering. Two methods were used to construct the similarity matrix, namely the nearest neighbors and radius search methods. Then, the Laplacian matrix was generated and normalized with different methods, such as random-walk normalization and symmetric normalization. The produced seven clusters were checked by looking into the eigenvalues then visually inspected by plotting a scatter plot for the clusters. If all the eigenvalues are zero or the plot did not indicate credible clusters then the method is not considered. The selected methods were furtherly assessed by checking eigenvalues one more time if they indicate a gap then the Silhouette coefficient is calculated for these seven clusters. This process was repeated to generated eight clusters and then evaluate the model performance. Then, other number of clusters (9, 10, and 11 clusters) were also tested. It was decided that we would start with seven clusters in order to detect as many shapes as possible of the audiograms for future supervised machine learning model with good accuracy. The lower the number of audiograms clusters the lower the accuracy of the predictions. On the other hand, the authors decided to stop at 11 clusters as the Silhouette coefficient dropped significantly. The algorithm steps are shown in Figure 2.  
Then authors picked the number of clusters with the highest 2 silhouette coefficients for further evaluation. These two numbers of clusters were compared by evaluating Silhouette coefficients, Calinski-Harabasz criterion, and Davies-Bouldin criterion. This was followed by generating audiogram population and annotating them according to the produced clusters and then these clusters were evaluated with the same three criteria methods Silhouette coefficients, Calinski-Harabasz criterion, and Davies-Bouldin criterion. This was carried out to test the clustering method for a large number of audiograms. Finally, the authors mapped the generated clusters to Bisgaard selected levels to compare their clusters with existing standards used in hearing aid measurements.