# Optimizing Cervical Cancer Diagnosis with Feature Selection and Deep Learning
## 2 Materials and Methods
### Feature Classification  
To analyze the selected features, we explore various classification algorithms and present their accuracy in distinguishing between TBS grades. We start with three popular and simple classifiers:  
* **Linear discriminant analysis**--here, we define a function that is a linear combination of the observations \(x\) (see Equation (9)): \[g(x)=w^{t}x+w_{0}\] (9) where \(w\) is the weighting vector and \(w_{0}\) is a bias [42]. If \(g(x)=0\), then Equation (9) defines a decision surface and separates observations of one class from another class. For a two-category classifier, we classify the data into first class (C\({}_{1}\)) if \((x)>0\) and second class (C\({}_{2}\)) if \((x)<0\). For \((x)=0\), the observation is classified into either class. For a multi-class problem we need to define several linear discriminant functions as in Equation (9). The number of functions should be the same as the number of classes used for classification. In this case, a classification rule will be defined by Equation (10). \[g_{i}(x)=w_{i}^{t}x+w_{i0}\qquad for\quad i=1,...\;nc\] (10) where \(nc\) is the number of classes. Equation (10) defines the decision regions \(R_{i}\) for \(nc\) classes where \(g_{i}(x)\) is the largest discriminant for \(x-es\) in that region. * **K-Nearest Neighbors (KNN)--**a popular and simple classifier that classifies a new data point based on the majority class among its k closest neighbors in the feature space [42]. Training of the KNN classifier consists of saving a feature vector values along with class label. The classification is based on the calculation of the distance metric, typically the Euclidean distance, to find the k closest points [43]. In this work, we also adopted the same metric, but additionally we have tested different numbers (between 1 and 10) of neighbors taken for label estimation. In the result section (see Section 4) we showed accuracy values for \(k=1\) and \(k=10\). * **Support Vector Machines (SVM)--**used to separate two or more classes of observations by constructing a boundary between them using border points from each class called support vectors [44]. Here, we employ a kernel-based approach to segregate data, which ensures a robust generalization of the problem. In this way, the classification of an unknown point is classified by its position with respect to the boundary. Training of the SVM model involves an iterative minimization of an error function (Equation (11)). \[\frac{1}{2}w^{T}w+C\sum_{i=1}^{N}\varepsilon_{i}\] (11) with the following restrictions: \[y_{i}(w^{T}\phi(x_{i})+b)\geq 1-\varepsilon_{i}\quad\text{and}\quad \varepsilon_{i}\geq 0,\quad i=1,\ldots,N\] (12) where \(C\) and \(b\) are constants, \(w\) is the weight vector, \(\varepsilon_{i}\) is a bias value that deals with overlapping cases and \(\phi\) is a kernel function that transforms input data into the feature space. The constant \(C\) has a significant influence on the error rate and must be carefully estimated during the training process. In this study, we perform a grid search on values varied between \(10^{-3}\) and \(10^{3}\). * **Neural Networks (NN)--**designed to simulate the behavior of the human brain to enable computers to learn from data. They consist of multiple layers of interconnected neurons, each connected through connections similar to synapses that carry weighted information. These weights are adjusted during training. The network prediction ability is then optimized based on input features. In this work, we adjust the internal parameters (weights and biases) based on the differences between the actual output and the desired output. This process, known as backpropagation, uses gradient descent to minimize network error across 200 iterations. For optimization, [PERSON]'s optimizer was used and the rectified linear unit (ReLu) was used as an activation function in hidden layers.