Heart Failure Classification Using a Hybrid Model Based on SVM and Random Forest
Abstract
This study discusses the development of a model to classify heart failure disease by combining two algorithms in the field of data mining: Support Vector Machine (SVM) and Random Forest (RF). The dataset used is the Heart Failure Prediction Dataset, consisting of 918 patient records containing medical information such as blood pressure, cholesterol levels, and heart rate. The research process began with data cleaning, normalization using MinMaxScaler, and data balancing with the SMOTE technique to equalize the number of cases between heart failure patients and non-patients. The data was then split into training and testing sets. Each model (SVM and RF) was tested individually and also combined into a hybrid model. Validation was performed using 5-Fold Cross Validation to ensure consistent results. The results show that SVM performed better in terms of precision for detecting heart failure after applying SMOTE, while RF remained stable even without data balancing. The hybrid model combining both algorithms achieved the best performance, with an accuracy of 91.20%, precision of 90.85%, recall of 92.44%, and an AUC score of 0.961. These results indicate that the hybrid model can detect heart failure more accurately and in a more balanced manner. With its high and consistent performance, this model is suitable for use as a decision support system in the medical field, particularly for early detection of heart failure.