Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi) (Feb 2024)
Max Depth Impact on Heart Disease Classification: Decision Tree and Random Forest
Abstract
Results in heart disease classification that are inaccurate and have low accuracy can endanger the patient's life. Some parameters in the algorithm model also influence classification. This study compares the Decision Tree and Random Forest algorithms for heart disease. The influence of maximum depth on heart disease classification also has significant implications. If the maximum depth is not set correctly, the classification results can be inaccurate and lead to incorrect diagnoses. This study uses five data split schemes, namely 60%: 40%, 70%: 30%, 75%: 25%, 80%: 20%, 90%: 10% and tested with different max depth parameters, namely max depth = 3, 4, 5, 6, and 7. This research produces the best accuracy using the 90%:10% scheme and max depth = 7 with the best accuracy result using the Random Forest algorithm of 99.29% while the Decision Tree algorithm is 98.05%. Then the precision and recall value of the Random Forest algorithm is 99% while the Decision Tree is 98%. The results of computation time using Decision Tree are faster than using Random Forest with a computation time for training data of 0.0075 s, while the testing data are 0.009 s. In future research, research can be conducted on the effect of other parameters by testing using several data sets.
Keywords