Heart disease is a leading cause of mortality in Indonesia, with the number of cases reaching 15.5 million in 2022. This study aims to classify heart disease using the Naïve Bayes algorithm optimized with Particle Swarm Optimization (PSO) to improve classification performance. The dataset used in this study was obtained from the Zenodo repository, consisting of 1,025 heart disease records with 14 features. The data were processed through preprocessing stages and divided into training and testing sets using the 10-Fold Cross Validation method. PSO optimization was applied to the var_smoothing parameter of the Naïve Bayes algorithm. Model performance was evaluated using a confusion matrix to obtain accuracy, precision, recall, and F1-score values. The results indicate that Particle Swarm Optimization (PSO) improves the performance of the Naïve Bayes algorithm. On the correlation-based feature selection dataset, accuracy increased from 81.49% to 84.48%, precision slightly decreased from 82.57% to 82.37%, recall increased from 84.38% to 91.62%, and F1-score increased from 83.00% to 86.33%. These findings demonstrate that the combination of Naïve Bayes and Particle Swarm Optimization (PSO) is effective in enhancing heart disease classification performance.
Copyrights © 2026