Data mining is a way of searching for information from large amounts of data for the purposes of various applications. Several techniques in data mining can be used for association, classification, clustering, prediction, and sequential modeling. Machine learning is used in medical science to help medical teams find out the condition of patients with heart disease. A lot of machine learning still has limited predictive capabilities, and is incompatible. This study uses different machine learning techniques, namely PSO-based SVM, Neural Network, Decision Tree, Naïve Bayes and SVM to assist in building, understanding and interpreting different models of heart disease diagnosis. The use of the pso-based svm algorithm in the prediction of heart disease shows a 100% greatest accuracy than the Decision Tree, only 88.68% and Naïve Bayes of 82.15%, Neural Network with an accuracy of. 95.71%, SVM with an accuracy of 99.71%. The results of this study are expected to be beneficial for the world of health and for researchers who use machine learning techniques.