## 6 Results  
**Implementation details**: A macOs computer with an Apple M1 Pro processor and 16 GB RAM was used for training and validation of the proposed model. Models were created with Spyder 5.1.5 and Python 3.9.12 using the Keras library. Scikit-learn, OpenCV, Pandas, and Numpy were used as dependencies, and Tensorflow, which specializes in effective training of deep neural networks by exploiting graphics cards, served as the backend engine. The choice of the Python language was related to its power and accessibility, which have made it the most popular programming language for data science. **Details of datasets used**: The model was trained with the ISIC 2018 and ISIC 2019 training datasets and was tested on the ISIC 2016 test dataset to ensure comparison of the results obtained with those reported in other papers. As mentioned above, only melanoma and nevi images were selected from each dataset. In the training datasets, the division between classes shows a strong imbalance in favor of the nevi class, whose images are numerically  
Figure 2: Proposed architecture. more than three times as numerous as those of melanomas (a widespread phenomenon in the medical field because it is relatively easy to get normal data, but it is quite difficult to get abnormal data). To arrive at a balance between the two classes under consideration, random downsampling (DS) of the nevi class was performed; specifically, the same number of nevi images were selected from the two training datasets such that their sum was equal to the number of melanoma images. The nevi images were randomly selected from each dataset. The initial and final numbers of melanomas and nevi in the two training datasets are reported in Table 3.  
The 10% training data are used as a validation set to provide the impartial process of model training. **Network configuration. ** After testing several configurations obtained by varying the optimizer between Adam, Adamax, and SGD; the initial learning rate between \(10^{-1}\) and \(10^{-4}\); and the batch size between 32 and 512; the parameters set for the proposed CNN network were:  
* Optimizer: Adam
* Initial learning rate: \(10^{-3}\)
* Loss function: binary cross entropy
* Number of epochs: 100
* Batch size: 128  
**Classification results**: As already anticipated, for the present work, GLCM and LBP texture features were considered for injection into the CNN network to improve its classification performance. Several experiments were conducted to try to find out whether it is convenient to use additional information to that already automatically extracted from the network and, if so, whether it is better to use the two separately or combined. In addition, to understand whether it is necessary to use a complex approach such as a CNN instead of simpler methods, texture features were classified by the most widely used ML methods for skin lesion classification, namely SVM, KNN, and LDA. * **SVM**: Both the linear kernel (with the values of the inverse regularization parameter C varied between 1, 10, 100, and 1000) and the RBF and polynomial kernels (with all possible combinations between the values of C equal to the previous ones and the values of the gamma parameter equal to 0.001 and 0.0001) were tested. For both GLCM and LBP feature classification, the best results were obtained using the SVM with the RBF kernel and setting the parameters C = 1000 and gamma = 0.001; for GLCM + LBP feature classification, the best result is obtained with a linear SVM and setting the parameter C = 100. * **KNN**: The number of neighbors was varied between 3 and 10. For both GLCM and LBP feature classification, the best result is obtained with K = 9; while for GLCM + LBP combination, the best result is obtained with K = 10. * **LDA**: Singular Value Decomposition (SVD) and Least Squares Solution (LSQR) resolution methods were tested, the former of which yielded the best classification performance for all features.