## 5 Discussion  
This paper proposes an optimized CNN model for skin lesion classification and diagnosis prediction. CNN methods for skin lesion classification often have challenges with calculating hyperparameters and tuning, resulting in coarse skin lesion classification. Our method is developed here as an attempt to overcome some of these challenges. A genetic algorithm was used to optimize the hyperparameter tuning of the CNN model. The optimized CNN model contains two stages, an encoder and a fully connected network (FCN), with each stage in charge dealing with a different aspect of the classification process. The encoder stage is focused on extracting the skin lesion features through various layers. At the same time, the FCN classifies the types of skin lesion features by applying a fully connected network. A DICE function calculates the loss values between model image prediction and the label images (ground truth). It uses less computational time because it does not apply sample re-weighting, unlike other loss functions such as the cross-entropy method.  
The proposed model reached up to a 98.66% accuracy, a 99.23% specificity, and a 98.57% sensitivity on the HAM10000 dataset. It also achieved high accuracy, specificity, and sensitivity of 95.96%, 97.45%, and 95.86% using the ISIC 2018 dataset. the accuracy of the optimized CNN model highlights several key factors. Firstly, the input features selected for the optimized CNN model were comprehensive and included all essential factors for skin lesion classification. This was crucial in ensuring the model had the necessary information to differentiate between different types of skin lesions. Secondly, the use of a genetic algorithm in the optimization process significantly contributed to the high  
Figure 10: Comparing the computational time and accuracy of the developed GA with other algorithms: (*) GA [23,24], (**) PSO [24, 25, 26], and (***) DE [24, 27]. The line fit is for visual purposes only.  
performance results of the optimized CNN model. The genetic algorithm enabled the model to identify the optimal hyperparameters, such as the number of neurons and activation functions, leading to improved accuracy. Finally, preprocessing, normalization, and data augmentation techniques were crucial in balancing the dataset and avoiding overfitting. Data augmentation was significant in increasing the number of images in the dataset, which helped the model to generalize better and improve performance. By carefully considering all these factors, the optimized CNN model achieved remarkable accuracy when tested on the datasets.  
From the evaluation of the architecture developed here, the model's usefulness is significantly encouraging and could join other state-of-the-art architectures as a new method. The application of the genetic algorithm is unique because of the application of the multi-evaluation function and this enhances the performance of the optimized CNN model. This improved performance suggests more research into optimization problems using CNN architectures. In particular, while the algorithm shows promising accuracy it is slow and further research improving the speed could be investigated.