# Decision Support System for Predicting Mortality in Cardiac Patients Based on Machine Learning
## 4 Experimental Results
### Experiment No.2: Performance of Proposed Model \(\chi^{2}\_\)RF on Balance Dataset  
In this study, we validated the performance of the newly proposed method (\(\chi^{2}\_\)RF) using the \(\chi^{2}\) module to select the most appropriate features from the dataset. At the same time, the optimized RF was used for classification. The hyperparameters of the Rf model were optimized using a lattice research algorithm. From Table 4, it can be seen that the performance of the proposed model is measured using the criteria of selected features (SF), training accuracy (Acc_train), test accuracy (Acc_test), sensitivity, specificity, F1_score, and the Matthews correlation coefficient (MCC). From Table 4, it can be seen that the proposed model \(\chi^{2}\_\)RF obtained the best test accuracy (Acc_test) of 94.59 % with a training accuracy (Acc_train) of 97.72%, a sensitivity of 98.00, a specificity of 80.77, an F1_score of 94.00%, and an MCC of 0.8413, with the optimal values of the hyperparameters of RF given as max_depth of a tree (D = 5) and n_estimators = 100. Comparison of Table 3 with Table 4 shows that the proposed model \(\chi^{2}\_\) RF improves the performance of the conventional model RF by 4%, where the conventional model RF uses all features of the dataset. In contrast, the proposed model \(\chi^{2}\_\) RF uses only 10 features, reducing the time complexity of the proposed method. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Model** & **Acc\_Train** & **Acc\_Test** & **Sensitivity** & **Specificity** & **F1 Score** & **MCC** \\ \hline NB & 65.36 & 71.17 & 100 & 41.82 & 71.00 & 0.5158 \\ LR & 87.15 & 82.85 & 90.00 & 56.67 & 82.00 & 0.5475 \\ DT & 83.65 & 84.00 & 83.0 & 100 & 84.00 & 0.4282 \\ RF & 91.00 & 89.07 & 75.88 & 31.00 & 89.00 & 0.4586 \\ KNN & 80.15 & 84.68 & 83.81 & 100 & 85.00 & 0.4675 \\ AdaBoost & 78.59 & 80.18 & 80.00 & 100 & 80.00 & 0.5756 \\ SVM\_RBF & 100 & 79.00 & 79.28 & 46.00 & 79.00 & 0.3856 \\ SVM\_sigmoid & 63.81 & 64.86 & 77.53 & 53.64 & 65.00 & 0.3251 \\ SVM\_linear & 89.42 & 90.74 & 78.00 & 22.50 & 91.00 & 0.4128 \\ SVM\_poly & 77.82 & 79.28 & 79.00 & 35.21 & 79.00 & 0.3467 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Performances of ML models on balance data using all features. In addition, we used the receiver operating characteristic (ROC) [40] to extensively test the efficacy of the newly proposed method (\(\chi^{2}\_\)RF). The conventional RF uses all dataset features, and the proposed ones (\(\chi^{2}\_\)RF) were tested based on ROC. It is worth noting that the key parameter of the ROC graph is the area under the curve (AUC), and the graph with a larger area under the curve is considered more efficient. From Figure 2(a), it can be seen that the proposed method (\(\chi^{2}\_\)RF) has a larger AUC than the conventional method RF, which is shown in Figure 2(b). The proposed method achieves an AUC of 94.00% compared to an AUC of 90% for conventional RF. Furthermore, the performance of the proposed model was evaluated based on the confusion matrix. Figure 4 provides an overview of the confusion matrix of the proposed model (\(\chi^{2}\_\)RF).