Detection of Skin Cancer Using Random Forest Algorithm in Python
- Version
- Download 2
- File Size 353.89 KB
- File Count 1
- Create Date 21 July 2025
- Last Updated 21 July 2025
Detection of Skin Cancer Using Random Forest Algorithm in Python
Subashini R, Vasuki S,Vaishnavi S, Sowndharya S
Abstract:
Melanoma is a severe and aggressive form of skin cancer that develops in the melanocytes, the pigment-producing cells of the skin. The total percentage of skin cancer cases in the dataset is 58.60%. Random Forest effectively classifies skin cancer by building multiple decision trees. This algorithm analyzes various features from dermoscopic images, such as colour, texture, and asymmetry, to accurately distinguish between benign and malignant lesions. Its robust nature helps improve diagnostic precision in dermatology. The dataset consisted of 3,297 images, with 1,800 benign and 1,497 malignant lesions. To facilitate classification, a watershed segmentation technique was applied to isolate lesion regions, from which significant features were extracted. These features included ABCD rule descriptors (Asymmetry, Border, Colour, Diameter), Grey Level Co-occurrence Matrix (GLCM) for texture, and various shape descriptors. Approximately 80% of the dataset was used for training the Random Forest model, while the remaining 20% was allocated for testing. The testing involved 10-fold cross-validation on 1,000 ISIC images. While SVM showed superior performance in some comparisons, the Random Forest classifier achieved a notable accuracy of 76.87%, sensitivity of 78.43%, and specificity of 75.31% when using ABCD features . Furthermore, Random Forest achieved the highest accuracy (87.7%) and F-score (0.739) among several other classifiers for skin detection using raw colour features, confirming its robustness and effectiveness. The evaluated model, trained on high-quality annotated datasets, achieved an overall accuracy of 0.98, demonstrating the algorithm's robustness and reliability.
Keywords: Melanoma, Skin cancer, Random Forest , Dermoscopic image, Benign lesions, Malignant lesions , accuracy.
Download