Enhancing prediction accuracy for Parkinson’s disease using advanced machine learning models Authors: Pradeepta Kumar Sarangi, Rajnish Srivastava, Monica Dutta, Ashwin Dobariya, Subhanshu Goyal, Sunil Lavadiya, Samah Alshathri, Walid El-Shafai Published: 2026 ABSTRACT Globally, Parkinson’s disease (PD), a neurological disorder, has a negative influence on the health of older adults. PD has no validated means of treatment, and thus, affects both social (i.e., mental) and physical health among individuals who experience PD. Therefore, it is essential to develop new methods for detecting PD to benefit the health of everyone involved. There is an opportunity to improve PD detection and accuracy by leveraging structured data sources and employing machine learning (ML). Ultimately, the goal of this research work is to provide an overall descriptive ML approach to diagnose PD utilizing acoustical data from the UCI Parkinson’s disease dataset and comparing XGBoost, random forest (RF), Support vector machine (SVM), and K-nearest neighbours (KNN), four of the most common algorithms for classifying data, in their ability to classify PD. The research project was conducted in four phases: (1) establishing a baseline model; (2) Stratifying a 10-Fold cross-validation; (3) Balancing the classes with synthetic minority oversampling (SMOTE); and (4) Reducing dimensions with principal component analysis (PCA). XGBoost achieved the highest accuracy (97.22%) among all models for classifying PD across all four phases of the research project, and also the highest Matthews correlation coefficient among all algorithms tested. This proves that XGBoost is better suited to model non-linear relationships. The results of the experiment showed that using SMOTE significantly improved the performance of the ML classification algorithm, especially that of the KNN algorithm. PCA significantly reduced the dataset’s dimensionality without sacrificing discriminative information. The outcomes demonstrated that the ML classification algorithms exhibited apparent performance differences, which diminished after applying SMOTE and PCA. Hence, it can be concluded that all machine learning classification algorithms had statistically similar classifier performance after the use of SMOTE and PCA. The results show that machine learning classification algorithms, particularly XGBoost and KNN, are effective at detecting PD early. The integration of SHAP-based explainability demonstrates that the proposed framework is not only accurate but also interpretable, thereby bridging the gap between predicted and clinically obtained results in PD diagnosis. Introduction Predictive modelling is used to identify early stages of disease in a variety of environments. By examining information such as past patient use history, genetics, and/or lifestyle, predictive modelling enables providers to estimate a patient’s risk of developing disease1. This will allow healthcare providers to use preventive measures to reduce patient risk and improve patient outcomes. Predictive modelling for identifying disease at its earliest stage is also heavily reliant on ML algorithms’ ability to sift through large volumes of complex healthcare data, identify correlations and patterns, and produce accurate predictions2. By using machine learning algorithms to analyse large datasets of healthcare data, healthcare professionals may be able to identify early warning signs of various diseases and provide timely interventions. The accuracy of predictive modelling is expected to increase as machine learning algorithms are applied and refined over time, with models optimised and retrained using datasets3. Parkinson’s disease (PD) occurs from dead or malfunctioning midbrain neurons. The primary cause of this condition is a disorder that destroys neurons that produce dopamine in the substantia nigra (SN) of the human brain (Fig. 1). The presence of PD causes various motor control disturbances, including bradykinesia, tremor, muscle stiffness, postural instability, and difficulty walking, all of which result from a significant drop in dopamine levels (Fig. 2)4. Dopamine is a messenger that carries signals from the brain’s SN to another area called the corpus striatum, which helps control smooth muscle movement and body movement5. In motor control, dopamine helps the nigrostriatal pathway function more effectively by enhancing communication between the SN and the striatum. This pathway ensures a smooth start to voluntary actions by modulating motor circuit activity. Dementia and depression are among the cognitive and behavioural problems that may manifest as the disease progresses6. However, these non-motor symptoms may vary from one patient to another and are not easily measurable. They are also not specific. PD cannot be diagnosed based on non-motor symptoms alone. However, non-motor symptoms may be used to support diagnosis. Medical observations and signs are used to diagnose PD. The traditional methods used to diagnose PD may be subjective because they rely on observing subtle movements that are difficult to classify. Non-motor symptoms that individuals may experience may be minor and result from other diseases7. As a result, these indications are frequently disregarded, which makes it challenging to diagnose PD upfront. To improve diagnosis and assessment, machine learning methods have been used to classify patients with comparable clinical signs, such as movement abnormalities, into PD and other Parkinsonian conditions, or into PD and healthy controls8. Healthcare is using machine learning more. Machine learning lets a logical program learn and understand meaning from data semi-automatically9. Serum, CSF (cerebrospinal fluid), neurological imaging, speech, handwriting motifs, motion, cardiac scintigraphy, and OCT (optical coherence tomography) are used to diagnose PD using ML models10. ML can also diagnose PD using MRI and SPECT data. Early and accurate PD detection allows effective interventions and treatments to slow disease progression11. Machine learning can analyse large, complex datasets, making it a better method for early-disease detection12. The utilisation of both clinical and biomedical data for early PD detection using specific ML tools is currently demanded by neuroscientists13. Using a comprehensive methodology, we strive to present a robust framework for early PD detection14,15. We use the XGBoost algorithm, a gradient-boosting technique, to show machine learning’s potential in healthcare. Model accuracy, precision, and recall are critical evaluation metrics that reveal the ability and efficacy of ML to detect PD16. Machine learning can be utilised to identify pertinent characteristics that are not currently used for PD detection but can be leveraged and associated with prominent preclinical and atypical PD pathophysiology17,18. The present study not only utilised various ML models for early PD detection but also conducted a comparative analysis of their outcomes to identify the best model using principal component analysis (PCA). These translational approaches aim to incorporate ML applications into future clinical practice19. In this study, we investigate how ML models can be used to identify PD. Our objectives include knowing the accuracy of different ML models in predicting early PD symptoms and developing methodologies to expedite PD identification. The primary contribution of this study will be to provide (a) a thorough comparison of each of the four different ML models in terms of their ability to predict early symptoms of PD, which will ultimately lead to an accurate identification of PD; (b) an assessment of the results generated by each ML model; and (c) an evaluation of each ML model’s ability to predict PD with respect to accuracy, confusion matrix, recall, sensitivity, F1-score, specificity, and precision. The manuscript structure is presented as follows: Sect. 1 introduces PD, its pathophysiology, and the role of ML in early prediction. Section 2 of this research discusses the existing work, the research gap, the motivation, and the objectives. Section 3 presents the dataset, its characteristics, and the descriptions of the models. The findings and explanations of this study are shown in Sect. 4, along with a comparison of the four ML models. Limitations are discussed in the next Section, the conclusion is explained in Sect. 6, and the future scope is demonstrated in Sect. 7. Fig. 1Pathophysiological characteristics of PD progression. Pathophysiological characteristics of PD progression. Fig. 2Illustration of motor and non-motor symptoms of PD. Illustration of motor and non-motor symptoms of PD. Related studies Several studies on the effectiveness of various traits that contribute to PD were conducted using decision trees (ID3) and decision stumps20. Here, the prediction model accuracy is 85.08% using decision trees, ID3s, and decision stumps. ANN, Pattern recognition, and SVM models were also suggested as potential ML models for PD predictions21. It assists professionals in making a PD diagnosis. With an accuracy of roughly 85.294%, the study’s dataset comprised a range of biological speech signals from both healthy and PD patients. Using an ANN, the study also employed machine learning models to differentiate between these groups22. The filtering method was used to enhance the data, while PCA was applied to reduce its dimensionality. An automatic PD detection system based on SVM and correlation-based classification was also used to detect PD in a patient’s speech or voice23,24. The best possible outcomes were an AUC of 0.97 and a 90.5% recognition rate. In25, the authors proposed that Naive Bayes, KStar, and RF-based voice recognition systems are among the emerging tools for PD diagnosis and prediction. In the status column, the numbers 0 and 1 correspond to healthy and sick patients, respectively. The corresponding prediction accuracy for KStar, RF, and Naive Bayes was 90.26%, 89%, and 69.23%. Classification methods, i.e., KNN and Naïve Bayes, were also applied to a speech dataset of sound recordings to predict the voice signals of several people and to identify whether a person was diseased or healthy26. The NB classifier obtained 93% accuracy, while the KNN achieved 80%. New techniques for differentiating between normal and abnormal voices include RBFNN and SVM27. The classifiers were utilised to train and test using both normal and pathological children’s voices28. The acoustic parameters, including Mean Square Residual signal, Formant frequencies, Signal Energy, reflection coefficients, Jitter, pitch, and Shimmer, were then extracted from the speech signal through analysis29. The accuracies of the RBFNN and SVM were 91% and 83%, respectively. A dynamic RF approach was proposed that involves real-time adaptation and configuration to optimise performance under changing conditions30. A polynomial fit function that minimises root-mean-square error to achieve the best fit determines the dynamic tree growth. With 32 to 72 trees in the forest, their method shows detection accuracy of 74.60 to 87.5%. The PD Detection Dataset from Oxford was utilised with the BP algorithm and MLFNN to detect and diagnose PD31. The results of this study showed that PD could be identified and diagnosed with 83.3% sensitivity, 63.6% specificity, and 80% accuracy. Images were input to neural networks through handwriting analysis map signals.32,33. The system was 95% accurate in distinguishing between diseased and healthy individuals. The classification model was trained automatically using 18 temporal aspects of MER records from 14 Parkinson’s patients, under KNN supervision, to provide a patient care tool after DBS surgery34. With an accuracy of 94.35%, KNN performed the best in this investigation. For training the dataset, MLP with the LM and SCG algorithms was suggested35. In this investigation, the SCG algorithm achieved 79% and 78% accuracy on the train and test data, whereas the LM algorithm achieved 97% and 92% accuracy on the train and test data36. A variety of biomedical speech samples for both healthy individuals and PD patients were used in the dataset. The average accuracy using the Parkinson’s data set was 85.03%. GP and EM algorithm-based detectors with an accuracy of 93% were used in cases where data may be noisy or incomplete, or where underlying distributions need to be estimated for effective detection37,38. A suggested approach is based on LDA, feature weighting, and LS-SVM. The DNN is applied using TensorFlow on Parkinson’s Voice Dataset39. The accuracies are 94.4% and 62.7% on the training and test data, respectively. The voice recordings of patients are analysed using logistic regression and DT40. In this investigation, the DT achieved 100% accuracy when no voice data were extracted, while logistic regression reached 90% accuracy. However, the decision tree’s prediction accuracy increased from 84 to 92% when parameters such as voice frequency and jitter were selected. Vowels and other aspects of voice were found to be statistically significant in distinguishing between subjective sickness and healthy subjects41. With accuracies of 91.23 and 91.25%, respectively, they applied the SVM and KNN ML algorithms. An overview of the background research using several ML models for PD prediction is given in Table 1. Table 1Different studies have been performed using different ML models for PD prediction.RefMethod usedDataset / featuresAccuracyMajor observations 20 SVM, Naïve Bayes, Decision Tree, MLPSpeech dataset96.5%, 84.6%, 92.3%, 94.8%Multiple models tested, but no feature optimisation 21 SVMBiomedical voice data79%Low accuracy compared to other models 22 ANN (Backpropagation)Speech signals92%A neural network requires large training data 23 Neural networkVoice dataset93.3%Focused on a single model 24 t-SNE-based modelVoice dataset78.73%Dimensionality reduction only 25 Neural networkVoice dataset91%Limited feature optimization 26 Decision treeSpeech dataset90%Limited feature engineering 27 Neural networkVoice dataset80%Moderate accuracy 28 sliding window & modular algorithmsVoice dataset—No performance reported 29 Neural networkSpeech features95%Focus only on NN 30 Random forestPD dataset90%No feature reduction 31 Neural networkPD dataset94.35%Small dataset 32 MLP (LM and SCG)Biomedical speech dataset92% and 78%Overfitting and performance variation 33 Biological study (TGF β1)Biomedical dataset—Not ML focused 34 Fuzzy entropyPD dataset84.52%Moderate accuracy 35 Feature weighting + MLPD dataset93%Limited model comparison 36 Neural networkVoice dataset94.4%Possible overfitting 37 SVM and neural networkVoice dataset91.25% and 91.23%Only the accuracy metric was evaluated 38 Multiple ML models with PCA & LDAPD dataset100%Possible overfitting 39 SVM and KNNVoice dataset89%Limited evaluation metrics 40 PRISMA-based PD dataset studyPD dataset—No classification performance 41 Decision tree (data mining)PD dataset94%Single model usedProposed workXGBoost, random forest, SVM, KNN with SMOTE + PCAParkinson’s dataset (180 samples)97.22Limited dataset size Table 1Different studies have been performed using different ML models for PD prediction.RefMethod usedDataset / featuresAccuracyMajor observations 20 SVM, Naïve Bayes, Decision Tree, MLPSpeech dataset96.5%, 84.6%, 92.3%, 94.8%Multiple models tested, but no feature optimisation 21 SVMBiomedical voice data79%Low accuracy compared to other models 22 ANN (Backpropagation)Speech signals92%A neural network requires large training data 23 Neural networkVoice dataset93.3%Focused on a single model 24 t-SNE-based modelVoice dataset78.73%Dimensionality reduction only 25 Neural networkVoice dataset91%Limited feature optimization 26 Decision treeSpeech dataset90%Limited feature engineering 27 Neural networkVoice dataset80%Moderate accuracy 28 sliding window & modular algorithmsVoice dataset—No performance reported 29 Neural networkSpeech features95%Focus only on NN 30 Random forestPD dataset90%No feature reduction 31 Neural networkPD dataset94.35%Small dataset 32 MLP (LM and SCG)Biomedical speech dataset92% and 78%Overfitting and performance variation 33 Biological study (TGF β1)Biomedical dataset—Not ML focused 34 Fuzzy entropyPD dataset84.52%Moderate accuracy 35 Feature weighting + MLPD dataset93%Limited model comparison 36 Neural networkVoice dataset94.4%Possible overfitting 37 SVM and neural networkVoice dataset91.25% and 91.23%Only the accuracy metric was evaluated 38 Multiple ML models with PCA & LDAPD dataset100%Possible overfitting 39 SVM and KNNVoice dataset89%Limited evaluation metrics 40 PRISMA-based PD dataset studyPD dataset—No classification performance 41 Decision tree (data mining)PD dataset94%Single model usedProposed workXGBoost, random forest, SVM, KNN with SMOTE + PCAParkinson’s dataset (180 samples)97.22Limited dataset size Different studies have been performed using different ML models for PD prediction. Identified research gaps After the extensive literature review, the identified gaps can be listed as follows: Evaluation and analysis of multiple models using comparative frameworks.Comparatively lesser use of statistical validation techniques to obtain a more robust model comparison.Very limited implementation of Explainable AI methods for clinical interpretation purposes.Use of other evaluation metrics apart from accuracy. Evaluation and analysis of multiple models using comparative frameworks. Evaluation and analysis of multiple models using comparative frameworks. Comparatively lesser use of statistical validation techniques to obtain a more robust model comparison. Comparatively lesser use of statistical validation techniques to obtain a more robust model comparison. Very limited implementation of Explainable AI methods for clinical interpretation purposes. Very limited implementation of Explainable AI methods for clinical interpretation purposes. Use of other evaluation metrics apart from accuracy. Use of other evaluation metrics apart from accuracy. Key contributions of the research work The proposed study presents a statistically validated ML framework to detect PD. The objectives of the research work are elaborated as: Baseline models are integrated with 10-fold cross-validation, dimensionality reduction using PCA, and SMOTE-based class balancing.Multi-classifier-based evaluation for similar experimental settings, like RF, XGBoost, KNN, and SVM.Considering multiple performance metrics like MCC and RoC-AUC, and applying Friedman and Nemenyi statistical tests to ensure better and more reliable comparison of models.SHAP-based Explainable AI is used for local and global understanding. Baseline models are integrated with 10-fold cross-validation, dimensionality reduction using PCA, and SMOTE-based class balancing. Baseline models are integrated with 10-fold cross-validation, dimensionality reduction using PCA, and SMOTE-based class balancing. Multi-classifier-based evaluation for similar experimental settings, like RF, XGBoost, KNN, and SVM. Multi-classifier-based evaluation for similar experimental settings, like RF, XGBoost, KNN, and SVM. Considering multiple performance metrics like MCC and RoC-AUC, and applying Friedman and Nemenyi statistical tests to ensure better and more reliable comparison of models. Considering multiple performance metrics like MCC and RoC-AUC, and applying Friedman and Nemenyi statistical tests to ensure better and more reliable comparison of models. SHAP-based Explainable AI is used for local and global understanding. SHAP-based Explainable AI is used for local and global understanding. Research gap, motivation and objectives Several important issues and research gaps remain despite substantial research on the application of machine learning (ML) to Parkinson’s disease (PD) detection. The first motivation for conducting this research is that several important issues and research gaps in applying ML to detect PD remain unexplored. Prior research used basic classifiers based on limited feature sets and small sample sizes; therefore, while they may produce accurate disease predictions, they are not very robust or generalizable. In addition, many studies failed to report key performance metrics important in medicine, such as specificity and F1-score. Lastly, most previous studies evaluated only an algorithm, rather than comparing multiple algorithms within the same study. Another missing aspect of the previous research was adequate feature analysis. These weaknesses motivate this research. Materials and methods This study provides an overview of PD patients, and speech signal recordings can be easily downloaded from UCI storage and are freely available. Various ML models are implemented and tested for their efficiency (Fig. 3). Fig. 3Workflow diagram for the suggested approach. Workflow diagram for the suggested approach. Methodology The proposed approach uses a structured machine learning workflow to produce valid calculations and prevent data leakage. The dataset was preprocessed with both feature scaling and encoding before applying the Synthetic Minority Oversampling Technique (SMOTE) to balance the class distribution. SMOTE was applied to the training (T) dataset of each fold of all K (n = 10) folds with a 1:1 ratio, while not used for the test dataset. A stratified 10-fold cross-validation protocol was employed, with K = n=10 and the original dataset randomly split into K = 10 folds. SMOTE was used to create a balanced dataset for training each fold’s training (T) dataset, while using the original test dataset to assess performance. The use of a 10-fold (n = 10) cross-validation protocol is based on prior research indicating it provides an optimal balance of bias and variance. Performance estimates based on a 10-fold cross-validation protocol have been shown to reduce variability in model performance estimates compared to smaller K, e.g., 5-K, which ultimately results in increased stability and reliability of performance estimates for testing and training datasets. Therefore, the use of a 10-K cross-validation protocol will provide an optimal balance between cost and the quality of model performance evaluation, while also allowing sufficient time for testing datasets. To reduce dimensionality and eliminate redundant features, Principal Component Analysis (PCA) was applied, retaining approximately 97% of the variance across nine components. Four machine learning models—XGBoost, RF, SVM, and KNN—were trained using optimised hyperparameters obtained via Grid Search. Performance of each model was calculated using various metrics, including accuracy, precision, recall, F1-score, MCC, and ROC-AUC, and further validated using statistical tests such as the Friedman test and Nemenyi post-hoc analysis to ensure reliable and unbiased comparison. Finally, SHAP-based explainability is used to quantify each feature’s contribution to model predictions. Dataset and attributes The performance and classification of PD were evaluated with the publicly available UCI Parkinson’s dataset. The original dataset comprises 195 biomedical voice recordings from 31 unique people, including both PD patients and healthy individuals. Each person provided multiple voice recordings, resulting in repeated measurements within individuals rather than fully independent samples. In this study, 180 instances with 24 attributes were utilised after preprocessing, with 15 samples removed during data cleaning. The dataset includes a variety of acoustic features derived from sustained phonations, such as frequency measures (e.g., MDVP: Fo, MDVP: Fhi, MDVP: Flo), amplitude perturbation measures (e.g., shimmer-related features), and nonlinear dynamic features (e.g., RPDE, D2, PPE), which are known to be relevant indicators of vocal impairment associated with Parkinson’s disease. The target variable (“status”) shows if a subject has Parkinson’s disease, where: 1 represents PD (positive class).0 represents healthy individuals (negative class). 1 represents PD (positive class). 1 represents PD (positive class). 0 represents healthy individuals (negative class). 0 represents healthy individuals (negative class). For model evaluation, an 80:20 train–test split was initially applied for baseline experiments. Additionally, stratified 10-fold cross-validation was used in subsequent experiments to ensure balanced class distribution across folds and to improve the robustness of performance estimation. It must be noted that, since the dataset contains many recordings per subject, the samples are not entirely independent. In the current study, data partitioning was performed at the recording level, meaning that recordings from the same person could appear in both the training and test sets. While this approach is commonly adopted in existing literature, it may introduce potential data leakage due to intra-subject correlation. To ensure transparency, this limitation is acknowledged, and future work will incorporate subject-wise (patient-level) cross-validation, in which all recordings from a given individual are confined to the train or the test sets. This strategy would provide a more realistic evaluation of model generalisation in clinical settings. A subset of the dataset with representative attributes is shown in Table 2, while a detailed description of all features is provided in Fig. 4. Table 2Dataset attributes (all attributes with the first five entries in the UCI database).Name →Attribute ↓phon_R01_S34_4phon_R01_S35_4phon_R01_S34_5phon_R01_S26_2phon_R01_S34_3MDVP: Fo(Hz)202.805202.632202.544200.714198.458MDVP: Fhi(Hz)231.508565.74241.35223.982219.29MDVP: Flo(Hz)86.232177.258164.16889.686148.691MDVP: RAP0.001890.009190.0010.003710.00182MDVP: Jitter(Abs)0.000020.000080.000010.000030.00002MDVP: PPQ0.002110.009630.001330.003370.00215MDVP: Jitter(%)0.00370.016270.002540.006210.00376MDVP: Shimmer(dB)0.180.8330.2280.2070.297MDVP: Shimmer0.019970.07170.026620.022860.03527Jitter: DDP0.005680.027560.003010.011120.00546Shimmer: APQ50.011770.042650.015580.014390.02076Shimmer: APQ30.011170.035150.014750.011920.02055spread1-5.898673-4.892495-6.132663-5.25832-5.585259spread20.2133530.2622810.2206170.2564540.310746MDVP: APQ0.015060.06460.020060.018520.0253Shimmer: DDA0.03350.105460.044260.035760.06165NHR0.02010.078890.010490.007040.01728HNR18.68714.98920.6823.23918.702status11111D22.4707462.9102132.5765632.5509612.465528PPE0.1890320.2701730.1597770.232520.209863RPDE0.5361020.4276270.497480.4360840.606273DFA0.6326310.7757080.6304090.7278630.661735 Table 2Dataset attributes (all attributes with the first five entries in the UCI database).Name →Attribute ↓phon_R01_S34_4phon_R01_S35_4phon_R01_S34_5phon_R01_S26_2phon_R01_S34_3MDVP: Fo(Hz)202.805202.632202.544200.714198.458MDVP: Fhi(Hz)231.508565.74241.35223.982219.29MDVP: Flo(Hz)86.232177.258164.16889.686148.691MDVP: RAP0.001890.009190.0010.003710.00182MDVP: Jitter(Abs)0.000020.000080.000010.000030.00002MDVP: PPQ0.002110.009630.001330.003370.00215MDVP: Jitter(%)0.00370.016270.002540.006210.00376MDVP: Shimmer(dB)0.180.8330.2280.2070.297MDVP: Shimmer0.019970.07170.026620.022860.03527Jitter: DDP0.005680.027560.003010.011120.00546Shimmer: APQ50.011770.042650.015580.014390.02076Shimmer: APQ30.011170.035150.014750.011920.02055spread1-5.898673-4.892495-6.132663-5.25832-5.585259spread20.2133530.2622810.2206170.2564540.310746MDVP: APQ0.015060.06460.020060.018520.0253Shimmer: DDA0.03350.105460.044260.035760.06165NHR0.02010.078890.010490.007040.01728HNR18.68714.98920.6823.23918.702status11111D22.4707462.9102132.5765632.5509612.465528PPE0.1890320.2701730.1597770.232520.209863RPDE0.5361020.4276270.497480.4360840.606273DFA0.6326310.7757080.6304090.7278630.661735 Dataset attributes (all attributes with the first five entries in the UCI database). Fig. 4Description of selected attributes in the dataset. Description of selected attributes in the dataset. Types of ML models used The four ML models used in this experiment are XGBoost, KNN, SVM, and RF. XGBoost model The ML algorithm XGBoost is well-known for its exceptional precision and effectiveness. It is a collective model that combines different predictors into a single strong model. Using a gradient-boosting framework, XGBoost iteratively trains models by adding new trees that minimise the residuals from earlier iterations43. This continues until the accuracy plateaus or the model reaches a predetermined number of iterations. Because it can handle missing values, outliers, and imbalanced classes, XGBoost is particularly useful for large datasets. Regression, classification, and ranking tasks are widely used across industries such as online advertising, healthcare, and finance. Figure 5 describes the functionality of the XGBoost model. Fig. 5Classifier functionality of the XGBoost model. Classifier functionality of the XGBoost model. XGBoost is an ensemble learning method relying on the gradient boosting algorithm. This technique creates a highly accurate predictive model by joining weak decision trees. The model minimises the regularised objective function defined in Eq. (1).1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L(\varphi ){\text{ }}=\sum 1 \left( {{y_i},{\text{ }}{{\hat {y}}_i}} \right){\text{ }}+\sum \Omega \left( {{{\mathrm{f}}_k}} \right)$$\end{document} where l(yi, ŷi) séic loss for classification), and Ω(fk) is the regularisation term defined as per Eq. (2).2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Omega \left( {{{\mathrm{f}}_k}} \right)=\gamma {\text{T }}+\left( {{\mathrm{1}}/{\mathrm{2}}} \right)\lambda {\left| {\left| {\mathrm{w}} \right|} \right|^2}$$\end{document} where T = total leaves in the tree, w is the weight of the leaves, and γ and λ are the regularisation coefficients. The model is trained by adding new trees to the existing ones. Each tree is taught to reduce the residual error of the previous trees as per Eq. (3).3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat {y}_{i}^{{(t)}}=\hat {y}_{i}^{{(t - 1)}}+{\text{ }}{{\mathrm{f}}_t}\left( {{{\mathrm{x}}_i}} \right)$$\end{document} Where:\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\widehat{\boldsymbol{y}}}_{\boldsymbol{i}}^{\left(\boldsymbol{t}\right)}$$\end{document} is the updated prediction for the ith data point at iteration t (after adding the new model), \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\hat{y}_{i}^{{\left( {t - 1} \right)}}$$\end{document} is the previous prediction for the same data point at iteration t − 1 (before adding the new model), \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\boldsymbol{f}}_{\boldsymbol{t}}\left({\boldsymbol{x}}_{\boldsymbol{i}}\right)$$\end{document} Is the new model (or weak learner) added at step t. It takes input \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{x}_{i}$$\end{document}and outputs a correction (residual estimate), \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{x}_{i}$$\end{document} is the input features of the i-th data point \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:i$$\end{document} is the index of the data point (i = 1, 2, …, n), and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:t$$\end{document} is the Iteration number (t = 1, 2, …, T), where each step adds a new model. The gradients of the loss function are computed to improve the model. This is the boosting part of the algorithm, which enables it to handle complex nonlinear relationships in data. SVM model The SVM is an effective supervised ML model for regression and classification, based on identifying the optimal decision boundary that categorises data points. The classification of new data points is subsequently performed using this hyperplane. SVMs are renowned for their excellent precision, effectiveness, and ability to handle large, complex datasets44,45. It has several uses, including bioinformatics, picture recognition, and text classification. Figure 6 illustrates the SVM model’s functionality. Fig. 6SVM model-based classifier. SVM model-based classifier. The SVM is a supervised ML method that tries to find the best hyperplane to separate points of different classes with the largest margin. Equation (4) explains the hyperplane.4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\text{w }}\cdot{\text{ x}}\,+\,{\text{b }}={\text{ }}0$$\end{document} The optimisation issue for SVM is calculated by Eq. (5). The min (1/2)||w||² subject to consition of Eq. (5).5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathrm{y}}_i}\left( {{\text{w }}\cdot{\text{ }}{{\mathrm{x}}_i}{\text{ }}+{\text{ b}}} \right)\, \geqslant \,{\mathrm{1}}$$\end{document} where w = weight vector, and b = bias. yi = class label, which is either − 1 or 1. However, for non-linearly separable datasets, the kernel technique is applied to map the characteristics into a higher-dimensional space. In the proposed work, the Radial Basis Function (RBF) is used as the kernel function, as per Eq. (6).6\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{K}}\left( {{{\mathrm{x}}_i},{\text{ }}{{\mathrm{x}}_j}} \right)\,=\,{\mathrm{exp}}( - \gamma {\left| {\left| {{{\mathrm{x}}_i}{\text{ }} - {\text{ }}{{\mathrm{x}}_j}} \right|} \right|^2})$$\end{document} K(xi, xj) is the kernel function value (similarity measure) between two data points. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{x}_{i}$$\end{document}and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{x}_{j}$$\end{document} The output lies in the range \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\left(\mathrm{0,1}\right)$$\end{document}. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x_i},{x_j}$$\end{document} → Feature vectors of the i-th and j-th data points. → Each vector typically lies in \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\mathbb{R}}^{d}$$\end{document}(d-dimensional space). \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\left\| {{{\mathbf{x}}_i}{\text{ }} - {\text{ }}{{\mathbf{x}}_j}} \right\|^2}$$\end{document} → The squared Euclidean distance between the two vectors. → Measures how far apart the two data points are. Exp → The exponential function, ensuring the kernel output decays smoothly with distance. Gamma (γ) → A hyperparameter controlling the spread (or width) of the kernel. → Must be a positive real number \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\left(\gamma\:>0\right)$$\end{document}. This technique enables the SVM classifier to learn non-linear decision boundaries, improving classification performance for the complex task of detecting Parkinson’s disease. KNN model Popular supervised ML algorithms for regression and classification issues include K-Nearest Neighbours (KNN)46. It determines a point’s KNN based on the distance metric, then groups the point according to the predominant class of its neighbours. An essential parameter affecting the model’s accuracy is k47. Although the KNN model is modest to understand, it can become computationally costly when dealing with massive datasets or high-dimensional spaces[42]. However, KNN is still widely utilised in many different applications, including medical diagnosis, recommendation systems, and image recognition48,49. Figure 7 illustrates how the KNN model operates. Fig. 7Functionality of the KNN model to define a datapoint. Functionality of the KNN model to define a datapoint. Euclidean distance measures the distance between each pair of samples. So, in the database, the composed features are represented in the feature space. If X (x1, x2, x3,…, xn) and Y (y1, y2, y3,…, yn) are the points present in space, then the Euclidean distance is measured between the two points and is defined as in Eq. (7).7\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\mathrm{D}(\mathrm{x},\mathrm{y})\:=\sqrt{{\sum\:}_{.i=1}^{n}{\left({x}_{i}-{y}_{i}\right)}^{2}}$$\end{document} The class of the data point is computed using Eq. (8).8\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat {y}{\text{ }}={\text{ majority class of k-nearest neighbours}}$$\end{document} In the present research, a distance-weighted k-NN model is employed. In this model, the weights of the data points are assigned as in Eq. (9).9\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathrm{w}}_i}={\mathrm{1}}/{\mathrm{D}}\left( {{\text{x, }}{{\mathrm{x}}_i}} \right)$$\end{document} The ‘k’ is critical in the model’s accuracy. The value of k is tuned. Random forest (RF) model A practical model for regression and classification tasks can be produced by combining multiple DTs using the widely used ensemble learning technique RF. In this case, predictions from multiple decision trees are combined to find the prediction. Various batches of the training data and numerous batches of features are used to train the decision trees. Randomly selecting subsets helps reduce overfitting and improve the model’s accuracy and generalisation50. Moreover, the RF model can handle missing values and noisy data and is easy to interpret and explain. It has been extensively utilised to generate precise forecasts and extract insights from complex data across industries, including promotional activities, medical services, and finance. The RF model’s functionality is depicted in Fig. 8. Fig. 8Multiple decision trees were integrated to obtain the final prediction from the RF model. Multiple decision trees were integrated to obtain the final prediction from the RF model. Systematic aspects of the ML models i. Cross validation: It is one of the most essential systematic aspects of ML and helps assess the usefulness of any predictive model51. Cross-validation also minimises the risk of overfitting and helps identify data leakage during model evaluation52. The implementation details of stratified 10-fold cross-validation in this work are provided in Sect. 4. Class distribution in each fold is explained in detail in Sect. 4.6. ii. Model optimisation and hyperparameter setting. Tuning the model refers to adjusting its hyperparameters to achieve optimal performance. The parameters adjusted before training to result in the best outcomes are known as hyperparameters53. In this experiment, four models are implemented, and the hyperparameters of all of them were set. The detailed hyperparameter settings are provided in the model implementation section. Confusion matrix The use of various classifiers is the foundation for PD detection. Measurement criteria differentiate between them, such as classification accuracy, specificity, sensitivity, F-score, etc. A formula for calculating these measurement criteria can be used to choose the most appropriate classifier for the research. We must pay close attention to the confusion matrix before defining these criteria. A contingency table evaluates how well a learning model performs in classification problems by measuring how closely its predictions match the true labels. The confusion matrix is typically used to assess a classifier’s performance. We consider a classifier’s performance utilising the measurement criteria from this matrix. Several authors focused on accuracy levels to evaluate overall performance. It shows the percentage of all reference sites that have been accurately mapped and evaluates performance regardless of class size54,55. Whenever a classification has a value of 100%, it is considered ideal, as all reference sites have been categorised. Usually, the overall accuracy is given as a percentage. Figure 9 is an explanatory diagram of a confusion matrix. Fig. 9A confusion matrix uses a contingency table to evaluate how well a learning model performs in classification problems by determining how closely its predictions match the truth. A confusion matrix uses a contingency table to evaluate how well a learning model performs in classification problems by determining how closely its predictions match the truth. The confusion matrix can assess the accuracy, specificity, and sensitivity of a classification model. The evaluation results then yield the performance measures. Precision shows the percentage of correctly predicted outcomes amongst the optimistic forecasts. Accuracy: The fraction of accurate predictions made by a model out of all possible forecasts. Sensitivity: The percentage of actual positives. Specificity: the percentage of real negatives. F1-score: The harmonic mean is calculated using precision and recall. Pseudocode and system architecture The pseudocode for the Machine Learning Framework is as follows: Input Data → Preprocessing → 80:20 Split /10-Fold CV →Model Training → Performance Evaluation →. Friedman & Nemenyi Tests → Model Comparison → Conclusion. The detailed steps of the algorithm were shown in Fig. 10. Fig. 10A schematic representation of the proposed methodology. A schematic representation of the proposed methodology. The whole data processing flow, from preprocessing (including SMOTE) and stratified partitioning to modelling, and then statistical validation via Friedman and Nemenyi tests, is shown in Fig. 10. In contrast, Fig. 11 depicts the system architecture used to execute the work. Fig. 11Schematic workflow of the machine learning–based classification framework. Schematic workflow of the machine learning–based classification framework. Figure 11 depicts the analytical workflow from input data collection to preprocessing (feature scaling, label encoding, SMOTE, and EDA). Using stratified 10-fold cross-validation, 80:20 train-test sets are created. F1 score, ROC-AUC, MCC, recall, accuracy, and precision measure model performance. Implementing and statistically comparing machine learning models using the Friedman-Nemenyi test yields model selection and conclusions. These models are Random Forest, SVM, KNN and XGBoost. Results and discussion Previous research typically used only one or two classification approaches; this work uses four machine-learning classifiers to assist doctors in diagnosing. To compare their ability to classify correctly, we performed a comparative study using the same dataset. The XGBoost algorithm is an ensemble-based gradient-boosting method with excellent predictive accuracy, is very computationally efficient, and can be used effectively to model multivariate linear relationships when complex nonlinear relationships are present in the population being classified. The use of regularization techniques with the XGBoost machine prevents individual classifications from being biased by outliers and provides good performance in handling missing data56. One helpful technique for capturing the local structure and features of a dataset is the KNN (K-nearest neighbours) classification method, which uses a nonparametric approach to assign labels according to the majority vote of the k nearest neighbours. When classifying large datasets, however, the KNN approach often requires substantial computational resources57,59. To enhance the accuracy and generalizability of the classification model, RF training trains numerous DTs using randomly selected feature subsets. Each decision tree then applies decision rules to split features into two output classes. Using the same data for each classification, this section details the execution and assessment of the four ML algorithms for categorisation58. Class 1 (Parkinson’s illness) is consistently considered the positive class in all studies. Plots comparing the feature response of RF, XGBoost, KNN, and SVM are shown in Fig. 12. RF and XGBoost clearly dominate influential feature identification. Whereas RF distributes importance more evenly, XGBoost shows abrupt spikes that indicate a strong dependence on specific traits60. Furthermore, because SVM and KNN do not compute feature values by default, their scores are obtained from outside estimation techniques, which results in nearly flat numbers. Overall, compared to SVM and KNN, the plot makes it easier to recognise and use key characteristics in tree-based models. Fig. 12Combined feature plots of RF, SVM, KNN, and XGBoost. Combined feature plots of RF, SVM, KNN, and XGBoost. Fig. 13Learning curves of RF, XGBoost, SVM, and KNN models. Learning curves of RF, XGBoost, SVM, and KNN models. Learning curves for Random Forest, XGBoost, SVM, and KNN are displayed in Fig. 13. While validation accuracy steadily improves with new data, training accuracy rises and remains high. While SVM and KNN exhibit modest validation performance and differ in their sensitivity to dataset size, models such as Random Forest and XGBoost demonstrate strong generalisation. The Matthews Correlation Coefficient (MCC) is provided along with the classification report. Interpretations of the XGBoost model When applied to the XGBoost model, the dataset produces the heatmap as in Fig. 14. Colour codes show the maximum and minimum counts on the right side of the matrix. Fig. 14Heat maps obtained from datasets by using the XGBoost model. Heat maps obtained from datasets by using the XGBoost model. The confusion matrix in Fig. 14 shows strong classification performance. Of the 7 healthy samples, 6 were correctly classified, while 1 was misidentified as having Parkinsonism. All 29 people with PD were correctly identified, so no labels were missed. Therefore, this matrix indicates excellent overall sensitivity and diagnostic reliability. Table 3Classification results on the XGBoost model.Classrecallprecisionf1-scoresupport00.861.000.92711.000.970.9829Accuracy0.97MCC0.91 Table 3Classification results on the XGBoost model.Classrecallprecisionf1-scoresupport00.861.000.92711.000.970.9829Accuracy0.97MCC0.91 Classification results on the XGBoost model. Table 3 displays the results of the XGBoost Model’s classification on two classes: Class 0 (No PD) and Class 1 (PD). Class 0’s recall is 0.86, and the precision rate is 1.00 (perfect). It misses some real cases but has a low false-positive rate. Class 1 boasts an exceptional recall of 1.00 and an extremely high precision of 0.97. Despite Class 0’s bias towards Class 1, the XGBoost Model’s high MCC (0.91) and overall accuracy of 0.97 suggest that the outcomes are evenly distributed across the classes. Interpretations of the SVM model The dataset produces a heatmap when applied to an SVM, as shown in Fig. 15. The colour code on the matrix’s right side depicts the maximum and minimum counts. Fig. 15Heat maps obtained from datasets by using SVM model. Heat maps obtained from datasets by using SVM model. The confusion matrix in Fig. 15 demonstrates that 4 of 7 healthy persons were correctly classified as healthy, and 3 were incorrectly classified as having Parkinson’s disease. There were no falsely identified cases of Parkinson’s out of 29 Parkinson’s cases in the classification. The classification is therefore highly sensitive but less specific, due to misclassifying healthy patients. Table 4Classification result on the SVM model.ClassRecallPrecisionf1-scoreSupport00.571.000.73711.000.910.9529Accuracy0.92MCC0.72 Table 4Classification result on the SVM model.ClassRecallPrecisionf1-scoreSupport00.571.000.73711.000.910.9529Accuracy0.92MCC0.72 Classification result on the SVM model. Table 4 shows the SVM model’s classification results for two classes. For class 0, precision is perfect (1.00), but recall is only moderate (0.57). While very few misclassifications occurred in predictions for class 0, some incorrect classifications still occurred. Class 1 has equal precision (0.91) and perfect recall (1.00); therefore, it achieves a very high F1 score (0.95) and an overall accuracy of 0.92, indicating high predictive power. The Matthews Correlation Coefficient (MCC) of 0.72 supports this conclusion, indicating strong and consistent classification despite class imbalance between classes 0 and 1. Interpretations of the KNN model The dataset produces a heatmap when applied to the KNN model, as in Fig. 16. The colour code on the matrix’s right side depicts the maximum and minimum counts. Fig. 16Heat maps were obtained from datasets by using the KNN model. Heat maps were obtained from datasets by using the KNN model. Figure 16 ‘s confusion matrix demonstrates that six out of seven healthy cases were appropriately identified, while one was mistakenly thought to have Parkinson’s disease. Conversely, out of 29 cases of Parkinson’s disease, 25 were accurately recognised as such; 4 were incorrectly labelled as healthy. With only a slight drop in sensitivity due to false negatives, the data performs admirably across the confusion matrix. Table 5Classification report on the KNN model.ClassRecallPrecisionf1-scoreSupport00.860.600.71710.860.960.9129Accuracy0.86MCC0.64 Table 5Classification report on the KNN model.ClassRecallPrecisionf1-scoreSupport00.860.600.71710.860.960.9129Accuracy0.86MCC0.64 Classification report on the KNN model. Table 5 summarises the outcome of the KNN model. With a recall of 0.86 and a precision of 0.60 for Class 0, the KNN model appears to identify most true Class 0 instances correctly; however, it yields a small number of false positives (i.e., inaccurate Class 0 classifications). Contrarily, Class 1 attained a remarkable equilibrium between recall (0.86) and precision (0.96), leading to an F1-score of 0.91. The KNN model is a trustworthy predictor, as evidenced by its overall accuracy of 0.86. In addition, KNN performs reasonably well on the dataset (i.e., somewhat well given the imbalance), with a Matthews correlation coefficient (MCC) of 0.64. Interpretations of RF model The dataset produces a heatmap when applied to the RF model, as in Fig. 17. The colour code on the matrix’s right side depicts the maximum and minimum counts. Fig. 17Heat maps were generated from the datasets using the RF model. Heat maps were generated from the datasets using the RF model. The Confusion Matrix in Fig. 17 indicates that five 5 non-Parkinsonian individuals were successfully classified. However, two 2 non-Parkinsonian individuals misclassified as having Parkinson’s Disease were not classified correctly at all. On the other hand, 29 PD subjects were correctly classified; thus, no false-negative results occurred. These outcomes demonstrate a very high diagnostic sensitivity, coupled with overall diagnostic success, resulting in minimal loss of specificity. Table 6Classification results on the RF model.ClassRecallPrecisionf1-scoreSupport00.711.000.83711.000.940.9729Accuracy0.94MCC0.82 Table 6Classification results on the RF model.ClassRecallPrecisionf1-scoreSupport00.711.000.83711.000.940.9729Accuracy0.94MCC0.82 Classification results on the RF model. The classification performance achieved by the Random Forest (RF) model is shown in Table 6. The RF Model has perfect precision (1.00) on Class 0 and a reasonably good recall of 0.71, indicating it correctly classified some examples but also misclassified others. The performance for Class 1 was also excellent (precision = 0.94, recall = 1.00, F1-score = 0.97), as it successfully identified the vast majority of instances in this class. The RF performed best among the others, with an accuracy of 0.94. As a bonus, a Matthews Correlation Coefficient (MCC) of 0.82 indicates that effective and balanced classification can be achieved even with class-size mismatches. Comparative analysis Table 7 compares model XGBoost (XGB) with SVM, KNN and random forest (RF) based on accuracy and Matthews correlation coefficient (MCC). With an accuracy of 97.22% and an MCC of 0.9103, the XGB model achieves the best overall classification performance across both metrics. Table 7Comparative analysis between XGB, SVM, KNN and RF models.ValuesModelsXGBSVMKNNRFAccuracy (%)97.2291.6686.1194.44MCC0.91030.71960.63550.8174 Table 7Comparative analysis between XGB, SVM, KNN and RF models.ValuesModelsXGBSVMKNNRFAccuracy (%)97.2291.6686.1194.44MCC0.91030.71960.63550.8174 Comparative analysis between XGB, SVM, KNN and RF models. The RF ranked second, with near-perfect predicted performance, based on an MCC of 0.8174 and an accuracy of 94.44%. More moderately positioned, the average SVM accuracy was 91.66% with an MCC of 0.7196, indicating it performed in the moderate predicted category. The KNN performed the worst for both accuracy (86.11%) and MCC (0.6355). Therefore, the findings show that, overall, XGBoost outperformed all models and is the best classifier for this dataset. Fig. 18Comparative analysis of ROC and precision-recall curves. Comparative analysis of ROC and precision-recall curves. The ROC and Precision-Recall curves in Fig. 18 compare classification algorithms. Both RF and XGBoost show excellent separation, as evidenced by high ROC (AUC) and AP scores, suggesting strong classification performance. KNN is moderately effective at classification but not as effective as SVM, which shows comparatively poor performance in classifying positive cases across multiple thresholds. Results with 10-fold cross-validation A 10-fold cross-validation has been used on the training dataset to ensure reliable and unbiased model performance. The key hyperparameters for each model are as follows: Model RF: n_estimators: 100, max_depth: 5. Model SVM: C: 10, kernel: rbf. Model KNN: n_neighbors: 3, weights: distance. Model XGBoost: learning_rate: 0.1, n_estimators: 200, maxdepth: 3. Fig. 19Cross-validation of the performances of RF, SVM, KNN and XGBoost models. Cross-validation of the performances of RF, SVM, KNN and XGBoost models. Figure 19 shows the results of a 10-fold stratified cross-validation comparison of the classification performance of RF, SVM, KNN, and XGBoost. The ROC-AUC and accuracy scores of all the models are very high. Recall and accuracy are most evenly distributed across XGBoost and Random Forest, whereas SVM has a lower recall and F1-score. Fig. 20Class distribution across folds. Class distribution across folds. Class distribution in each fold is as follows: For class 0: Train set count 36 and Test set count 4. For class 1: Train set count 126 and Test set count 14. Friedman statistic = 13.6765, p-value = 0.003380. There is strong evidence that the machine learning models assessed here differ considerably in performance, as indicated by the Friedman test statistic of 13.6765 and the accompanying p-value of 0.00338 (Fig. 20). Both values are below the conventional significance level of 0.05. Table 8 presents the results of the Nemenyi post hoc test for pairwise comparisons. A significant difference between SVM and KNN was found (p = 0.0286), indicating a meaningful difference in their performance levels, according to the results of the Nemenyi post-hoc multiple comparisons test. This difference was shown in pairwise p-values following a significant Friedman test, confirming a statistically significant difference between classifiers. Table 8Nemenyi post-hoc pairwise comparisons.ModelRandom forestSVMKNNXGBoostRandom forest1.00000.07250.98570.9857SVM0.07251.00000.02860.1601KNN0.98570.02861.00000.8999XGBoost0.98570.16010.89991.0000 Table 8Nemenyi post-hoc pairwise comparisons.ModelRandom forestSVMKNNXGBoostRandom forest1.00000.07250.98570.9857SVM0.07251.00000.02860.1601KNN0.98570.02861.00000.8999XGBoost0.98570.16010.89991.0000 Nemenyi post-hoc pairwise comparisons. In contrast, there was not much difference in performance between RF and XGBoost and the other classifiers, as the p-values were greater than 0.05. Thus, by interpreting these analysis results together, the majority of classifiers demonstrated similar performance. At the same time, SVM and KNN exhibit statistically distinct performance patterns, thereby establishing that performance discrepancies are model-specific rather than uniformly distributed across all classifiers. Implementation of SMOTE SMOTE improves the quality of models trained on baseline data. Paired T-tests have been conducted to determine whether class balancing with SMOTE has a statistically significant impact on the models’ performance. Table 9Paired T-test results (Baseline vs. SMOTE).ModelRandom forestSVMKNNXGBoostt-value0.534-3.2062.840-0.179p-value0.60610.01070.01940.8617 Table 9Paired T-test results (Baseline vs. SMOTE).ModelRandom forestSVMKNNXGBoostt-value0.534-3.2062.840-0.179p-value0.60610.01070.01940.8617 Paired T-test results (Baseline vs. SMOTE). The results in Table 9 indicate no statistical differences in the performance of RF and XGBoost (p > 0.05). However, SVM and KNN showed statistically significant improvements in model performance after class balancing with SMOTE (p < 0.05), indicating that SMOTE has a considerable positive impact on these two algorithms by improving minority-class learning. The SVM model had a negative t-value, indicating a decrease in performance. In contrast, the KNN model had a positive t-value, indicating improved performance after class balancing. Implementation of principal component analysis (PCA) As an extension to the above experiments, PCA has been implemented to reduce the size. The accuracy of the number of PCA components is shown in Fig. 21, followed by the Scree plot in Fig. 22. Fig. 21Model’s accuracy for different numbers of PCA components (Accuracy Vs number of principal components). Model’s accuracy for different numbers of PCA components (Accuracy Vs number of principal components). The graph in Fig. 21 represents the model’s accuracy for different numbers of PCA components. Accuracy increases sharply up to 3 components, then stabilises gradually and peaks at 9 components (highlighted). Beyond 9 PCs, accuracy remains nearly constant, indicating that additional components contribute little meaningful information and 9 PCs offer the best performance–complexity balance. The scree plot shows that the first principal component represents most of the variance, followed by a sharp drop-off from PC2 onward. Cumulative variance rises steadily, reaching about 97% by the 9th component. This indicates that nine components retain nearly all the meaningful information while significantly reducing dimensionality. The PCA Scree plot is shown in Fig. 22. The model-wise performance of nine components is shown in Fig. 23. The results of several models against the performance metrics of the Random Forest, SVM, KNN, XG, and their associated scores and accurate favourable/unfavourable rates (refer to Fig. 23). The KNN model had the highest accuracy and slightly higher F1 and ROC AUC scores than any other model, and therefore, it provided the best overall classification and discrimination; however, it also had the lowest recall. SVM maintains a relatively consistent level of performance, with high precision and recall throughout. The Random Forest model is also very good at remembering or identifying positives. Although competitive with the Random Forest model, XGBoost’s metric values were lower than those of all other models. Fig. 22Scree plot depicting the relationship between individual and cumulative variance vs. the number of components. Scree plot depicting the relationship between individual and cumulative variance vs. the number of components. Fig. 23Performance comparison of models with PCA (SMOTE + 10-fold CV). Performance comparison of models with PCA (SMOTE + 10-fold CV). Figure 24 shows the Random Forest, SVM, KNN, and XGBoost curves, as well as the Precision-Recall (PR) curve. We used SMOTE, principal component analysis, and 10-fold cross-validation to test the classifiers. Indicating high classification performance, all classifiers have ROC curves that are virtually in the top-left corner. However, KNN and Random Forest have shown an advantage over the other classifiers. Furthermore, the PR curves demonstrate excellent accuracy across a broad range of recall, particularly for the KNN and SVM classifiers, suggesting that these classifiers effectively handled the class imbalance introduced by SMOTE. To sum up, the classifiers consistently achieved high classification accuracy. With a Friedman test statistic of 1.3393 and a p-value of 0.7198, all of the machine learning models that were assessed performed similarly. There is no way to reject the null hypothesis, since the p-value is too high, suggesting that the performance variances are more likely due to random chance than to significant differences between the models. Thus, under the experimental conditions provided, all models perform similarly, and it is not possible to conclude that any one classifier is statistically better. Table 10 displays the adjusted p-values from the Nemenyi Post Hoc Pairwise Comparisons. Fig. 24Performance comparison of models ROC Vs Precision-Recall. Performance comparison of models ROC Vs Precision-Recall. Table 10Nemenyi post-hoc pairwise comparison (PCA).ModelRandom forestSVMKNNXGBoostRandom forest1.0000000.9997670.9301400.899884SVM0.9997671.0000000.9544110.930140KNN0.9301400.9544111.0000000.999767XGBoost0.8998840.9301400.9997671.000000 Table 10Nemenyi post-hoc pairwise comparison (PCA).ModelRandom forestSVMKNNXGBoostRandom forest1.0000000.9997670.9301400.899884SVM0.9997671.0000000.9544110.930140KNN0.9301400.9544111.0000000.999767XGBoost0.8998840.9301400.9997671.000000 Nemenyi post-hoc pairwise comparison (PCA). Following the Friedman test results, the Nemenyi post-hoc tests examined pairwise comparisons among the classifiers, including Random Forest, SVM, KNN, and XGBoost. Table 10 lists the adjusted p-value of each pairwise comparison between classifiers. All four classifiers have adjusted p-values > 0.05, indicating no statistically significant differences among them. Thus, by confirming the Friedman test result, all four classifiers have statistically equivalent performance under the same experimental setting. However, the accuracy and other evaluation metrics differ slightly. Table 11Performance of all models: SMOTE + PCA+10-fold CV.ModelPrecisionAccuracyRecallF1-ScoreROC-AUCRandom forest0.93940.91110.95000.94330.9652SVM0.95700.92220.94290.94890.9643KNN1.00000.92780.90710.94940.9750XGBoost0.94250.90560.93570.93800.9464 Table 11Performance of all models: SMOTE + PCA+10-fold CV.ModelPrecisionAccuracyRecallF1-ScoreROC-AUCRandom forest0.93940.91110.95000.94330.9652SVM0.95700.92220.94290.94890.9643KNN1.00000.92780.90710.94940.9750XGBoost0.94250.90560.93570.93800.9464 Performance of all models: SMOTE + PCA+10-fold CV. Table 11 compares 4 ML models—XGBoost, RF, SVM, and PCA + 10-fold CV—based on their predictive performance, measured by ROC-AUC, F1-score, Precision, and Accuracy. Classification capability was on full display across all four machine learning models (i.e., 90% or above accuracy). The KNN obtained the maximum classification accuracy of 92.78%. Similar to the SVM model, the KNN model demonstrated exceptional discriminative performance, achieving a flawless precision of 1.0000 and a remarkable ROC-AUC of 0.975; however, its recall was slightly lower. With excellent precision, recall, and F1 Scores, the SVM model demonstrated the most balanced performance, earning it the designation as a stable and durable model. While both Random Forest and XGBoost showed impressive performance, XGBoost was more consistent, and Random Forest produced flawless recall scores. In the PCA-SMOTE evaluation, there was relatively slight variation among the classifiers, with KNN showing somewhat better discriminative performance, despite XGBoost’s superior performance in the baseline and cross-validation studies. Explainable AI using SHAP To enhance the interpretability and transparency of the proposed ML framework, SHAP (Shapley Additive exPlanations) was employed. SHAP provides a unified approach to quantify each feature’s contribution to model predictions by assigning Shapley values based on cooperative game theory. This enables both global and local interpretation of model behaviour, which is crucial for clinical decision support systems. Figure 25 presents the SHAP summary plot, showing the total effect of features on predictions across all samples. Features are ranked by importance, with MDVP: Fhi (Hz), PPE, and spread1 identified as the most influential predictors of Parkinson’s disease. In the plot, positive SHAP values indicate contributions toward the Parkinson’s class, while negative values correspond to the healthy class. The colour gradient represents feature magnitude, with red showing higher values and blue showing lower values. The analysis reveals that higher values of PPE, D2, and spread1 consistently push predictions toward Parkinson’s disease, confirming the importance of nonlinear dynamic speech features.Conversely, frequency-based features such as MDVP: Fhi(Hz) and MDVP: Fo(Hz) exhibit mixed contributions, indicating complex relationships with the target variable. The widespread use of SHAP values further highlights the presence of nonlinear interactions, justifying the effectiveness of ensemble models such as XGBoost in capturing such patterns. Fig. 25SHAP summary plot interpretation. SHAP summary plot interpretation. Figure 26 shows the significance based on mean absolute SHAP values. The results confirm that MDVP: Fhi(Hz) is the most dominant predictor, followed by PPE, spread1, and D2, indicating their strong influence on classification performance. Acoustic features such as MDVP: Shimmer (dB), MDVP: Fo (Hz), and MDVP: RAP also contribute significantly, reflecting the role of vocal instability and amplitude variation in the detection of Parkinson’s disease. Although individual contributions of some features are moderate, their combined effect remains substantial, as indicated by the aggregated contribution of the remaining features. This analysis demonstrates that both frequency-domain features and nonlinear dynamic measures are essential for accurate classification. Fig. 26Global SHAP feature importance. Global SHAP feature importance. Fig. 27SHAP Waterfall plot – individual prediction explanation. SHAP Waterfall plot – individual prediction explanation. Figure 27 illustrates the SHAP waterfall plot for an individual prediction, providing an in-depth breakdown of how feature contributions lead to the final model output. Starting from the baseline prediction, each feature either increases or decreases the prediction score. In this instance, features such as PPE (+ 0.84), spread1 (+ 0.59), and MDVP: Shimmer (dB) (+ 0.51) positively contribute to Parkinson’s disease prediction, indicating that higher values of these features are associated with pathological speech characteristics. In contrast, MDVP: Fhi(Hz) (− 1.71) and MDVP: Fo(Hz) (− 0.89) exhibit strong negative contributions, reducing the prediction score. This visualisation shows that model predictions are driven by a combination of competing feature effects rather than by a single dominant factor, emphasising the complexity of acoustic biomarkers.From a clinical perspective, the SHAP analysis coordinates with established characteristics of PD. Features such as jitter, shimmer, and PPE represent vocal instability, irregular phonation, and noise in speech signals—key indicators of dysarthria commonly observed in PD patients. The dominance of nonlinear features such as PPE and spread1 suggests that subtle irregularities in speech dynamics are crucial for timely detection. Furthermore, the interaction among multiple features reflects the heterogeneous nature of Parkinson’s disease, in which symptoms arise from complex physiological processes. Limitations ML models also have certain limitations, despite the promise for early PD detection. The most crucial issue is the dataset’s lack of demographic diversity, which stems from its modest size. The second drawback is that PD features are clinically diverse and depend on more than simply voice, unlike voice-derived acoustic features, which rely on a single modality. Finally, no DL nor hybrid ensemble techniques were used in the investigation; instead, traditional ML models were utilised. Conclusion Before it is too late, we need to figure out how to diagnose Parkinson’s disease. With prompt assistance, victims’ lives would be better. To assess how well four popular classifiers, XGBoost, Support Vector Machine, Random Forest, and K-Nearest Neighbours, perform on a Parkinson’s disease speech dataset, this research primarily aims to develop an extensive machine learning framework. The framework used multiple evaluation methods at different stages, including baseline modelling, stratified 10-fold cross-validation performance metrics, class balancing via SMOTE, and dimensionality reduction via PCA. Results from quickly evaluated baseline and cross-validation methods highlighted XGBoost as the most predictive model, achieving the highest predictive performance scores in modelling the data’s nonlinear relationships. Generally, Random Forest performed similarly to other methods, but it achieved a high recall, making it a better choice for practical clinical applications when false negatives must be avoided. After applying SMOTE, performance improved significantly for the SVM and KNN models, reinforcing the necessity of class balancing in imbalanced medical datasets. In addition, PCA reduced feature dimensionality while preserving most of the discriminative information in the original high-dimensional feature space, resulting in more consistent predictive performance across models. Statistical validation using the Friedman and Nemenyi tests showed statistically significant differences among models in the baseline condition; however, these differences disappeared when PCA and SMOTE were applied, so all classifiers had statistically equivalent performance. This indicates that pre-processing and validation methods are critical in assuring an unbiased evaluation of models. This research confirms that, under optimal conditions, machine learning (especially XGBoost and KNN) is a valuable tool for identifying early signs of PD. Even with limited data, the proposed framework can support clinical decision-making. Future research must aim to create multimodal clinical datasets, develop larger, more varied datasets, apply advanced deep learning and explainable AI techniques, and ultimately improve diagnostic accuracy and the real-world applicability of diagnoses. Automated hyperparameter tuning was used to optimise model performance by systematically searching for the optimal hyperparameter combination. Grid Search with stratified 10-fold cross-validation was used to evaluate multiple configurations for every classifier. The optimal hyperparameters were chosen based on the highest mean cross-validation accuracy. This approach ensures reproducibility, reduces manual bias, and improves generalisation performance. All experiments were implemented in Python 3.10 using scikit-learn (v1.4) and XGBoost (v2.0). Random seeds were fixed to 42 for data partitioning, stratified cross-validation, and model initialisation. Experiments were executed on a standard desktop environment, and all parameter configurations and evaluation metrics are reported to support reproducibility. Future direction The future research can be focused on further exploring the datasets with more clinically relevant and diverse parameters to include varied subjects, both typical and atypical PD, early and late-stage PD, to enhance its generalizability. A multimodal approach integrating symptomatic features and biomarkers can improve predictive performance and model efficacy; furthermore, it enhances the validity of ML, particularly in terms of performance. Furthermore, advancing ML methods through DL and hybrid architecture modules can improve model accuracy and interpretability. The need for external validation using independent datasets or prospective clinical studies remains to be explored in the present study. To overcome dataset-specific biases, it is essential to assess the dataset’s real-world applicability. Furthermore, integrating deep neural networks, hybrid ensemble architectures, and explainable AI will advance machine learning techniques, potentially improving diagnostic accuracy and interpretability. Incorporating longitudinal data for progression monitoring rather than static classification will enhance the predictability of ML models in real-time applications. The development of a web application may also be helpful for the effective use of machine learning models. Clinician collaboration could support the development of ML models for patient-centric, non-invasive, remote, and real-time PD screening in telemedicine environments.