## 2 Materials and Methods
### Clustering Algorithm  
The K-means algorithm is a widely used method in the field of unsupervised machine learning to identify patterns and clusters in datasets. First, a number K of desired clusters are selected, and K centroids are randomly initialized in the feature space of the dataset. Next, each point in the dataset is assigned to the cluster represented by the nearest centroid, using distance measures such as the Euclidean distance. After the initial assignment, centroids are updated by recalculating the average of the features of the points assigned to each cluster. This process of centroid assignment and updating is repeated iteratively until a converged state is reached. The K-means algorithm is based on minimizing the sum of the squared distances between each point and the corresponding centroid. This can be expressed as an objective function \(J\) (Equation (1)) that seeks to minimize the intra-cluster variance. Optimization is performed using the heuristic optimization technique known as expectation-maximization. For the selection of K clusters, the Jambu elbow criterion is used to determine the optimal number of K clusters. The sum of the squared distances from each point to the centroid of its assigned cluster is calculated and these values are plotted as a function of the number of clusters. The inflection point in the graph, which resembles an \"elbow\", indicates the number of clusters in which increasing the number of clusters no longer provides a significant improvement in the explained variability [36; 37; 38]. In this case, the aim is to identify the different levels existing in the response variables.  
Before applying the clustering algorithm, the concentrations are coded with a 1 if there is a value and with a 0 if there is no value. The results of the clustering algorithm are visualized over the principal components vector to observe and interpret the data's distribution patterns, gaining valuable insights into the underlying structures and relationships within the dataset [39]. This dimensionality-reduction technique transforms the original variables into a new set of variables called principal components. These components are orthogonal to each other and reflect the maximum variance of the data. Mathematically, the algorithm searches for the eigenvectors \(\overset{\rightarrow}{e}_{i}\) and eigenvalues \(\lambda_{i}\) of the covariance matrix \(\mathbb{C}\) of the data (Equation (2)). Then, the \(e\) eigenvectors corresponding to the \(e\) largest eigenvalues are selected (in this case, \(e=2\)) to transform the original data \(\overset{\rightarrow}{X}\) into a new lower-dimensional subspace \(\overset{\rightarrow}{Y}\) (Equation (3)).  
\[J=\sum_{i=1}^{n}\sum_{K=1}^{K}w_{ik}\|x_{i}-c_{K}\|^{2} \tag{1}\]  
\[\mathbb{C}\overset{\rightarrow}{e}_{i}=\lambda_{i}\overset{\rightarrow}{e }_{i} \tag{2}\]  
\[\overset{\rightarrow}{Y}=\overset{\rightarrow}{X}\overset{\rightarrow}{e }_{i} \tag{3}\]  
such that \(x_{i}\) represents each data point, \(c_{K}\) is the centroid of the group \(K\), and \(w_{ik}\) is an indicator variable that is equal to 1 if data point \(x_{i}\) belongs to the group \(K\), or 0 otherwise.