Abstract
In recent years, the application of machine learning (ML) in the field of healthcare has witnessed a significant surge, offering promising solutions to longstanding challenges in medical diagnostics. As the volume and complexity of medical data continue to grow, traditional diagnostic methods often reliant on subjective clinical expertise struggle to maintain accuracy, consistency, and efficiency. Machine learning models, with their capacity to analyze vast datasets, detect hidden patterns, and make data-driven predictions, present a viable alternative to enhance and support clinical decision-making processes. This study undertakes a comparative analysis of five prominent supervised machine learning algorithms: Decision Tree (DT), Random Forest (RF), Support Vector Machine (SVM), Logistic Regression (LR), and K-Nearest Neighbours (KNN). The core objective is to evaluate the performance, reliability, and applicability of these algorithms in predicting medical conditions, using two benchmark datasets widely recognized in the healthcare domain the Breast Cancer Wisconsin dataset and the Pima Indian Diabetes dataset. These datasets were selected due to their clinical relevance, balanced distribution, and availability of labelled diagnostic outcomes.
Each algorithm was implemented in a controlled environment using Python and the scikit-learn library. Data pre-processing steps included handling missing values, feature normalization, and class balancing where required. The models were evaluated using k-fold cross-validation to ensure robustness and minimize bias. Standard performance metrics—accuracy, precision, recall, and F1-score were employed to provide a comprehensive assessment of model effectiveness. The study revealed that the Random Forest classifier consistently outperformed other models, achieving the highest accuracy and lowest variance across both datasets. It demonstrated resilience against over fitting and provided better interpretability compared to more complex models like SVM. While SVM showed excellent performance, particularly with high-dimensional data, it required more computational resources and hyper parameter tuning. Logistic Regression and Decision Tree, though simpler in structure, offered valuable insights and were easier to interpret, making them useful in scenarios requiring transparency in diagnostic reasoning. KNN performed adequately but was sensitive to feature scaling and data noise. This comparative study not only informs the selection of suitable ML algorithms for diagnostic applications but also underscores the importance of model evaluation in real-world clinical settings. The findings advocate for a hybrid approach balancing predictive accuracy with interpretability to ensure ethical, efficient, and effective deployment of AI in healthcare. Future work may explore ensemble deep learning architectures, larger and more diverse medical datasets, and integration with Internet of Medical Things (IoMT) for real-time diagnostic assistance.