Comparative Analysis of Some Machine Learning Algorithms for the Classification of Ransomware

by Adeniyi, Adedayo Omoniyi, Adepoju, Temilola Morufat, Olabiyisi, Stephen Olatunde, Sanusi, Bashir Adewale

Published: September 2, 2025 • DOI: 10.51244/IJRSI.2025.120800045

Abstract

Ransomware is a serious cybersecurity threat, encrypting data and demanding payment for its release. This study compares six machine learning algorithms, these are Random Forest (RF), Decision Tree (DT), Neural Network (NN), Support Vector Machine (SVM), K-Nearest Neighbors (KNN), and Naive Bayes (NB) for ransomware classification. A GitHub sourced dataset was preprocessed using standard techniques, and feature selection was done using correlation analysis, mutual information, and recursive feature elimination. Models were trained and evaluated using Python’s scikit-learn library, assessed on accuracy, precision, recall, F1-score, and ROC-AUC. RF achieved the best performance with 99.98% accuracy and 99.99% ROC-AUC, followed closely by DT and NN. NB performed poorly across most metrics. Results indicate RF as the most effective model for ransomware detection. These findings support the development of intelligent threat detection systems for cybersecurity platforms, cloud infrastructure, and endpoint protection.