Multilayer Perceptron Neural Network for Multiclass Skin Cancer Classification
Abstract
Skin cancer is a significant public health issue, and its computer-aided diagnosis has been widely explored using machine learning. This study investigated the use of a Multilayer Perceptron (MLP) network for the multiclass classification of lesions from the HAM10000 dataset, highlighting its limitations for image-based tasks, especially in imbalanced scenarios. The images were resized to 64 × 64, vectorized (d=12288)(d=12288), and standardized. The model employed two dense layers with ReLU activation and a softmax output for 7 classes. Seven configurations were evaluated by varying the learning rate and the number of neurons. The best result, obtained with SMOTE-based balancing (α=0.0001, architecture 128–64)(α=0.0001, architecture 128–64), achieved an accuracy of 70.84% and a weighted F1-score of 70.32%. Although the model captured relevant patterns, it showed low performance on minority classes and signs of overfitting. Compared with approaches such as CNNs and Transformers, the MLP proved limited because it ignores spatial structure, making it suitable only as a baseline.