# Research on Performance Metrics and Augmentation Methods in Lung Nodule Classification
## 3 Methodology
### Convolutional Neural Network for Classification  
CNNs are pivotal in image classification systems, particularly following medical image segmentation tasks like those performed by U-Net on CT scans. As illustrated in Figure 1[25], CNNs are structured with an array of layers including input, multiple convolutional layers, pooling layers, fully connected layers, and an output layer. In medical imaging, such as lung nodule detection, convolutional layers apply filters to detect relevant features like edges and textures, while pooling layers reduce the dimensionality of feature maps, decreasing computational load and preventing overfitting. The fully connected layers integrate these features into high-level representations crucial for classification tasks, such as distinguishing between benign and malignant nodules. The training of CNNs necessitates large volumes of labeled data, a significant challenge in medical imaging due to the scarcity and expense of obtaining precise annotations. Data augmentation methods are often utilized to expand training datasets and boost the model's generalization capabilities. Extensive validation and testing ensure the CNN's robust performance across varied clinical settings, enhancing diagnostic accuracy and patient outcomes through more precise disease detection. In this work, augmentation methods were leveraged to improve the generalization capability and balance the positive and negative samples during training. Cross-entropy loss is employed in training to force the model to learn correct prediction of nodule class. The loss is defined by  
\[loss=\frac{1}{N}(-\log\frac{\exp(x_{n,y_{n}})}{\sum_{c=1}^{C}\exp(x_{n,c})}), \tag{2}\]  
In this study, a categorical classification approach was used, where \(C\) represented the number of classes, and \(N\) was the batch size, with \(x_{n,c}\) denoting the logit corresponding to class \(c\) for each input in the batch. This method is particularly apt for training models in problems involving \(C\) distinct classes. Unlike the mean square error loss (MSE), which em  
Figure 1: Network for classification. phasizes minimizing the numerical differences between the output logits and specific target values, our focus shifts towards ensuring that the logit for the correct class is the highest among all classes. This approach aligns more closely with the objectives of classification tasks where the accuracy of class prediction is more critical than the exact numerical output of logits. However, we acknowledge the potential benefits of exploring alternative loss functions, such as weighted cross-entropy loss. This variant could indeed provide a more nuanced approach by assigning different weights to the classes, thereby addressing the imbalance between positive and negative samples more directly. Regarding regularization techniques, L1 and L2 regularization can be leveraged to mitigate the risk of overfitting. L1 regularization can promote model sparsity and feature selection, and L2 can improve the generalization of the model on unseen data. While these advanced techniques were not implemented in the current study, they represent valuable areas for future research that could enhance the model's sensitivity to under-represented classes. This work employs Rectified Linear Unit (ReLU) as the activation function, which is defined as  
\[f(x)=max(0,x). \tag{3}\]  
It is characterized by its ability to introduce nonlinearity while maintaining computational efficiency, as it simply thresholds negative values to zero. This attribute not only speeds up computation but also facilitates sparsity within network activations, with only a subset of neurons activating at any given time. ReLU is particularly valuable for its role in mitigating the vanishing gradient problem commonly seen with saturating activation functions like sigmoid or tanh, as its gradient remains constant.