## 3 Material and Methods
### Formation of Criteria for Assessing the Quality of the Cluster Structure
The second component of the internal clustering quality criterion is calculated as the square root of the sum of squares of all values of hybrid proximity metric between all pairs of the cluster medians:  
\[CB=\sqrt{\sum_{i=1}^{K-1}\sum_{j=i+1}^{K}MI(M_{i}M_{j})^{2}} \tag{8}\]In this case, it should be noted that better clustering corresponds to a smaller value of the distance between gene expression profiles in the clusters (larger value of criterion (7)) and a larger distance between the clusters (smaller value of criterion (8)). Taking into account this fact, the formula for calculating the internal clustering quality criterion can be presented as follows:  
\[QC_{int}=\frac{CB}{K\cdot CW} \tag{9}\]  
where the number of clusters \(K\) is, to some extent, a \"normalized\" coefficient, i.e., formula (9) determines the average density of the gene expression profiles and medians of the corresponding clusters distribution relative to one cluster. In accordance with this criterion, a smaller value of criterion (9) corresponds to better clustering. The external criterion assumes the presence of two equivalent subsets of gene expression profiles. Whether using this criterion is reasonable is determined by the minimization of the reproducibility error, which is intrinsic to most existing data clustering algorithms. In other words, the clustering results obtained on the same data are not always repeated within the acceptable error when using another equivalent subset of data. It is obvious that if the nature of the gene expression profiles' distribution in equivalent data subsets is similar, the values of the internal criteria (9) obtained on these subsets should not differ significantly from each other. When the reproducibility error increases, the discrepancy between the values of the internal criteria will increase. Taking this fact into account, we propose to calculate the value of the external clustering quality criterion as the normalized difference of the values of the internal criteria obtained on the equivalent data subsets A and B:  
\[QC_{ext}=\frac{|QC^{A}_{int}-QC^{B}_{int}|}{QC^{A}_{int}+QC^{B}_{int}} \tag{10}\]  
A smaller value of this criterion corresponds to a smaller discrepancy of the clustering results obtained on equivalent data subsets. However, it should be noted that the values of the internal and external criteria can disagree with each other. High internal criterion values (unsatisfactory clustering on equivalent subsets) can be similar to each other. This fact can lead to a low external criterion value. In this case, it is reasonable to calculate the balance criterion, which contains as the components both the internal and external criteria. The balance criterion was calculated using Harrington's desirability function (Figure 2). One of the significant advantages of the Harrington method is that in is not necessary to normalize the input vectors with high objectivity when the output parameter calculation is performed. Normalization of the input data is performed automatically at the stage of the transformation of the input parameters' scales into the scale of the dimensionless output parameter Y, the values of which are varied within the range from \(-2\) to \(5\). In this instance, the algorithm to calculate the balance criterion involves the following steps:  
1. Evaluation of the coefficients \(a\) and \(b\) in the linear equations considering the boundary values of the appropriate criteria: \[ \begin{split} Y_{max}&=a-b\cdot QC_{min}\\ Y_{min}&=a-b\cdot QC_{max}\end{split} \] (11) where \(Y_{min}=-2;\ Y_{max}=5\), \(QC_{min}\), and \(QC_{max}\) are the minimal and maximal values of the internal and external criteria, respectively. 2. Transformation of both the internal and external criteria values into the value of the dimensionless parameter Y: \[ \begin{split} Y^{A}_{int}&=a^{A}_{int}-b^{A}_{int} \cdot QC^{A}_{int}\\ Y^{B}_{int}&=a^{B}_{int}-b^{B}_{int}\cdot QC^{B}_{int} \\ Y_{ext}&=a_{ext}-b_{ext}\cdot QC_{ext}\end{split}