Title: Hyperparameter tuning and comparison of k nearest neighbour and decision tree algorithms for cardiovascular disease prediction
Authors: Preeti Bhowmick; Sachin Gajjar; Shital Chaudhary
Addresses: Department of Electronics and Communication Engineering, Nirma University, Ahmedabad, India ' Department of Electronics and Communication Engineering, Nirma University, Ahmedabad, India ' Department of Electronics and Communication Engineering, Nirma University, Ahmedabad, India
Abstract: This work aims to do hyperparameter tuning and comparison of k nearest neighbour (kNN) and decision tree algorithms for cardiovascular disease (CVD) prediction using Framingham dataset. Hyperparameter tuning is done to find optimal value of k using Euclidean, Manhattan and Chebyshev distance metric in kNN. Hyperparameter tuning is done in decision tree, to find optimal value of the depth of the tree using Gini index and information gain attribute selection method. The algorithms are compared on the basis of confusion matrix, accuracy, error rate, specificity, recall, precision, F1 score, execution time and ROC-AUC. The results show the accuracy of the decision tree is 2% less than kNN but decision tree is 46.36% more time efficient. The AUC value of kNN is 0.613 and decision tree is 0.588. Decision tree is more appropriate for predicting CVD, as it predicted ten more true positives in confusion matrix.
Keywords: cardiovascular disease prediction; machine learning; hyperparameter tuning; k nearest neighbour; kNN; decision tree.
International Journal of Swarm Intelligence, 2021 Vol.6 No.2, pp.118 - 129
Received: 11 Jun 2020
Accepted: 27 Nov 2020
Published online: 29 Oct 2021 *