## 2 Materials and Methods
### Artificial Intelligence Algorithms for Temperature Data Processing  
Artificial neural networks are a universal information processing tool and are widely used in various applications of medical diagnostics [14; 97; 98]. We use the convolutional neural network (CNN) based on the VGG16 architecture [99]. Figure 15 demonstrates the scheme of an artificial neural network for the problem of binary classification of MWR data.  
Figure 14: Samples structure used in machine learning algorithms: the sizes of “REAL” and “SIMULATION” datasets (**a**), Test and Training datasets (**b**), “Healthy” and “Cancer” classes (**c**).  
Figure 13: Distributions of internal temperature values at point “0” according to the following classes: “Healthy” according to medical examinations (“REAL”) (**a**); dataset “REAL” if diagnosed with cancer (**b**); “Healthy” according to the results of computational experiments (dataset “SIMULATION”) (**c**); “Cancer” by dataset “SIMULATION” (**d**).  
Our software module implements the random partition method to form sets of images, on which the neural network is subsequently trained and tested. The method includes the creation of sets by random selection of data. Sensitivity, specificity, and classification efficiency are calculated as the arithmetic mean of all partitioning results. It is important to control the number of epochs in the process of training the neural network so that there is no overfitting regime.  
NVIDIA CUDA parallel computing technology was used to increase the speed of the neural network. We performed neural network classification using the QUADRO RTX 4000 graphics card based on the NVIDIA Turing architecture (Nvidia Corporation).  
We use the following machine learning algorithms for binary classification of temperature data: support vector machine (SVM) [100], k-nearest neighbor method (KNN) [101], and naive Bayes classifier (NBC) [102]. The Gaussian kernel with a radial basis function and parameter \(\gamma=0.7\) underlies the SVM algorithm. We apply the weighted voting method for the KNN algorithm with the parameter \(k=5\). The effectiveness measure of medical diagnostics is the geometric mean of sensitivity and specificity  
\[eff=\sqrt{sens\times spec}, \tag{15}\]  
where \(sens=\dfrac{TP}{TP+FN}\), \(spec=\dfrac{TN}{TN+FP}\), \(TP\) is the number of correctly classified breasts for class \"Cancer\", \(FN\) is the number of misclassified breasts for class \"Cancer\", \(TN\) is the number of correctly classified breasts for class \"Healthy\", and \(FP\) is the number of breasts that are misclassified as \"Healthy\".  
The F1-score value is an integral estimate of the precision and recall of classifiers, which calculates the harmonic mean using the formula  
\[F1=\dfrac{2\times precision\times recall}{precision+recall}, \tag{16}\]  
where \(precision=\dfrac{TP}{TP+FP}\) and \(recall=\dfrac{TP}{TP+FN}\).  
Additionally, we calculate the Matthews correlation coefficient (or Phi coefficient) for all methods:  
\[\phi=\dfrac{TP\times TN-FP\times FN}{\sqrt{(TP+FP)(TP+FN)(TN+FP)(TN+FN)}}. \tag{17}\]  
The Phi coefficient is a measure of the quality of binary classifications in the case of markedly different samples in size, as the number of patients is small compared to the number of healthy people in real medical screening conditions.  
We mix the data in the test set many times to correctly assess the classification efficiency. This provides the method of randomly splitting the sample into five overlapping subsamples in which the ratio of Healthy to Sick is the same and corresponds to the parent population. Thus, the representativeness of the sample is preserved. Classification results are averaged over five blocks.  
Figure 15: Used CNN scheme for binary classification of thermometric data.