# Optimizing Cervical Cancer Diagnosis with Feature Selection and Deep Learning
## 2 Materials and Methods
### Classification Metrics  
This section will introduce the classification metrics used for LBC slide classification. To comprehensively evaluate the obtained results, it is essential to define metrics that can demonstrate the effectiveness of the proposed model. This approach allows for further comparison of the classification methods [47].  
The fundamental method includes defining the confusion matrix, which records the classifiers' output [48]. In this research, we employ a multi-class variant of the confusion matrix. This matrix includes three values on its diagonal that indicate the count of correct responses (\"true\"). The other six values represent misclassifications. Based on the recorded values, the values of \"true positive\" (TP), \"false negative\" (FN), and \"false positive\" (FP) can be calculated. These metrics reflect the classifier's decision-making accuracy. The \"false negative\" metric is determined by summing all incorrectly classified examples of a class. Conversely, the \"false positive\" metric represents the total number of instances where other classes have been incorrectly identified as this particular class. For further evaluation of model accuracy, _Precision_ and _Recall_ measures are defined. They help to understand how well a model performs in terms of its predictive capabilities, particularly when dealing with data sets where the balance between classes is a critical factor.  
Based on the confusion matrix values, we define the measures _Precision_ and _Recall_ for our system. _Precision_ measures the accuracy of positive predictions made by the model. It is calculated as the ratio of true positive observations to the total predicted positives. _Recall_, on the other hand, measures system's ability to make true positive classifications and is defined as a ratio of true positives and all actual positive values. These metrics are often used together to provide a complete picture of the performance of a model. In many practical applications, there is a trade-off between _precision_ and _recall_, which can be balanced depending on the specific requirements. In the oncological classification, keeping both values as high as possible is very important. For the comprehensive assessment of the classifiers, _Error_ and _Accuracy_ were also calculated. _Error_ is the proportion of false positives and false negatives to the total number of samples, while _Accuracy_ is simply \(100\%-Error\).  
For a reliable assessment of model performance, a five-fold stratified cross-validation technique was applied. It involves dividing the data set into five equal parts, ensuring that each fold maintains the same proportion of classes as the original data set, which preserves the integrity of the distribution. During each of the five iterations of model assessment, four of the five folds are used for training, and the remaining fold is used to test the performance. By repeatedly training and testing the model across these folds, we gain insight into the stability of the model and its ability to generalize across different data samples.