# Aspects of Lighting and Color in Classifying Malignant Skin Cancer with Deep Learning
## 2 Materials and Methods
### Experiments and Evaluation Metrics  
The methodology developed in the proposal for this work was implemented in Python (v3.11.7) using TensorFlow (v2.15.1) and PyTorch (v2.2.1). The experiments were conducted on a computer with an Intel Core i9-11900 KF processor, 32 GB of RAM, and an GIGA-BYTE NVIDIA 3090 24 GB GDDR6 GPU. It is important to highlight that lighting and  
Figure 4: Suggested lighting and color correction methods: The subfigure (**a**) represents the uncorrected images, the subfigure (**b**) represents the images corrected with the LCDPNet method, the subfigure (**c**) shows the images corrected with the LLNeRF method, and the subfigure (**d**) represents the images corrected with the DSN method.  
color correction techniques are applied before cropping the images and using them in the training process.  
In this work, we adopted the experimental systematic of k-fold cross-validation to divide the processed images into sets. We allocated 80% of the images for training and 20% for testing, setting aside 20% of the training set specifically for validation. This process was repeated k times, ensuring each division was used exactly once. We recommend setting k = 5 for this procedure [36].  
In our experiments, we adopted a binary classification approach. In this context, we categorized images of melanoma, basal cell carcinoma, and squamous cell carcinoma as malignant, while all other images were classified as benign. The imbalance between malignant and benign classes poses a significant challenge, potentially diminishing the effectiveness of classification models. We resort to the test-time augmentation (TTA) [37] technique to mitigate the imbalance between classes and achieve a more effective balance. This approach is applied to training, validation, and test sets, focusing on the class of malignant lesions.  
The classification architecture training was conducted through transfer learning, followed by fine-tuning. The suggested architectures had already been pretrained with the ImageNet dataset. Furthermore, we developed a hyperparameter calibration to improve the performance of the models. This calibration includes adjustments to the learning rate, batch size, and optimization function without restrictions on these parameters.  
We suggest using accuracy (_Acc_) and precision (_P_) metrics to assess the architectures' classification performance. Accuracy represents the proportion of correct predictions, covering the total number of samples and both true positives (_TP_) and true negatives (_TN_) [36]. On the other hand, precision measures the proportion of true positives among all instances classified as positive, including both true and false positives (_FP_). The following formulas describe these metrics, respectively.  
\[Acc=\frac{TP+TN}{Total} \tag{1}\]  
\[P=\frac{TP}{TP+FP} \tag{2}\]  
The area under the curve (_AUC_) is also an important metric for evaluating the predictive capacity of models derived from the receiver operating characteristic (_ROC_). This metric assesses the model's ability to distinguish between the defined classes, regardless of the classification threshold. A single value represents the area under the curve, shaped by the relationship between true positives (_TP_) and false positives (_FP_). The _AUC_ can range from 0 to 1, where values close to 1 indicate an effective model, while values below 0.5 suggest a random prediction model [36].  
Finally, the standard deviation acts as another crucial statistical measure to evaluate the dispersion of classification results among the folds. This metric reveals how close to or far away from each other the individual results of each fold are. A standard deviation value relative to zero signals minimal dispersion among the results, indicating that the variations in performance observed across different folds are low [36].