# Decision Support System for Predicting Mortality in Cardiac Patients Based on Machine Learning
## 5 Discussion  
In this work, we presented a decision support system for predicting cardiac patient mortality with machine learning using electronic health records (EHR). The developed model consists of two hybridized modules combined into a single unit. The first module is based on a statistical model (\(\chi^{2}\)) that helps to select the most important features from the feature space, while an RF model was used to classify mortality. The hyperparameters of the RF model were optimized using a grid search algorithm. To evaluate the efficiency of the newly developed system, a public dataset from [22] was collected. It was found that the classes in the collected dataset were highly imbalanced. ML models tend to favor the majority class when trained on an imbalanced dataset. To avoid this problem, we used SMOTE to balance the classes in the training process of the proposed model.  
To validate the efficacy of the proposed model (\(\chi^{2}\)-RF), we used various evaluation metrics, such as accuracy, sensitivity, specificity, F1 score, MCC, and AUC by using ROC.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Model** & **SF** & **Acc.\_Train** & **Acc.\_Test** & **Sensitivity** & **Specificity** & **MCC** \\ \hline NB & 03 & 64.65 & 72.07 & 87.34 & 34.37 & 0.2512 \\ LR & 13 & 83.84 & 78.37 & 97.14 & 46.34 & 0.5358 \\ DT & 14 & 94.19 & 88.28 & 94.52 & 66.66 & 0.6403 \\ KNN & 09 & 84.09 & 87.38 & 90.42 & 70.58 & 0.5610 \\ AdaBoost & 14 & 91.14 & 86.48 & 95.18 & 60.71 & 0.6198 \\ SVM\_linear & 14 & 83.38 & 72.07 & 95.38 & 39.13 & 0.4341 \\ SVM\_sigmoid & 13 & 80.55 & 67.56 & 96.55 & 35.84 & 0.4132 \\ SVM\_poly & 11 & 92.67 & 86.48 & 97.46 & 59.37 & 0.6574 \\ SVM\_RBF & 11 & 92.17 & 89.21 & 100 & 58.33 & 0.6972 \\ Proposed Model & 10 & 97.72 & 94.59 & 98.00 & 80.77 & 0.8413 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Performances of ML models on balanced data using the \(\chi^{2}\) feature selection.  
Figure 5: ROC curve of ML models based on the \(\chi^{2}\) feature selection model.  
Table 4 shows that the newly constructed model achieved the highest test accuracy of 94.57% by using only 10 selected features from the first module of the proposed method. In addition, we tested the performance of the proposed model (\(\chi^{2}\_\)RF) by using ROC curves. The performance of the conventional model RF is compared with the proposed model (\(\chi^{2}\_\)RF) based on the curve ROC. A machine model with a larger area under the curve (AUC) is more efficient and accurate. From Figure 3, it can be seen that the proposed model (\(\chi^{2}\_\)RF) has a greater AUC of 94.00% compared to the conventional RF model of 90.00%. Moreover, the performance of the proposed model is also compared with other state-of-the-art ML models using the same feature selection module (\(\chi^{2}\)) based on the above evaluation metrics. The performance of the proposed model compared to other state-of-the-art ML models is shown in Table 6, where SVM with an RBF kernel achieves the second highest accuracy of 89.21% while using 11 selected features from the dataset.