# Choose the feature that maximizes the evaluation function J()
## 3 Results and Discussion
### Performance of ML Algorithms  
The most suitable algorithm to classify patients is the random forest algorithm, with only five attributes, and the performance obtained in the area under the curve (AUC) is 0.93; whereas logistic regression and support vector machine show a lower performance, so they are discarded. On the other hand, it is important to highlight the difference between the performance obtained for 14 attributes (accuracy 0.87, AUC 0.93) and that for 5 attributes (accuracy 0.85, AUC 0.93). The difference is approximately 0.02 in accuracy, which can be considered of little difference. However, if only 5 attributes are considered, and not 14, there is a reduction in the number of attributes by approximately 60%, which represents a significant improvement in terms of data efficiency (Figure 12). To find the most suitable algorithm for classifying patients, three parameters were obtained to measure their performance: accuracy, sensitivity, and area under the curve. Table 3 shows a summary of the three algorithms and their respective performances obtained during the testing of the algorithms. First, with 5 purely non-invasive attributes, and then with 14 attributes between non-invasive and invasive. While random forest performs best in all cases, logistic regression experiences a notable drop in accuracy when increasing the number of attributes from 5 to 14 (from 0.79 to 0.62). This suggests that LR struggles with high-dimensional data and may not generalize well when additional features are introduced. Conversely, SVM improves with more attributes, reaching an accuracy of 0.83, but still underperforms compared to RF. To further validate these findings, Figure 13 presents the confusion matrices for each model with 5 and 14 attributes, providing a detailed view of the classification errors. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Features** & **Algorithm** & **Accuracy** & **Sensitivity** & **AUC** \\ \hline \hline \multirow{3}{*}{5} & Logistic Regression (LR) & 0.79 & 0.78 & 0.79 \\  & Random Forest (RF) & 0.85 & 0.82 & 0.93 \\  & Support vector machine (SVM) & 0.78 & 0.75 & 0.77 \\ \hline \hline \multirow{3}{*}{14} & Logistic Regression (LR) & 0.62 & 0.74 & 0.92 \\  & Random Forest (RF) & 0.87 & 0.88 & 0.93 \\ \cline{1-1}  & Support vector machine (SVM) & 0.83 & 0.82 & 0.88 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Performance of machine learning classification algorithms. Figure 12: (**A**) Table that contains the 14 attributes available in the UC Irvine database. (**B**) Table with a reduction to 5 attributes. The confusion matrices (Figure 13) confirm the superiority of RF in patient classification. With five attributes, RF achieves a strong balance between true positives (139) and low false negatives (25), ensuring high sensitivity (0.82). When using 14 attributes, RF further improves, reducing false negatives to 23, thereby reinforcing its reliability for medical screening. LR struggles with high-dimensional data, as seen in its confusion matrix for 14 attributes, where false negatives increase to 57, significantly reducing its sensitivity. This suggests LR is unsuitable for detecting high-risk patients, particularly when adding more features. SVM improves with more attributes, reducing misclassifications, but still under-performs compared to RF. Its higher false negatives suggest a lower reliability in identifying patients at risk. Overall, RF consistently minimizes misclassification errors, making it the most effective model for screening patients with a limited set of non-invasive attributes. These results reflect a lower computational and data collection cost, making it easier for clinicians to classify patients using fewer tools. The measurement and classification processes also become simpler and faster. A slight decrease in accuracy in RF, less than 0.1 (approximately 2%), is observed when prioritizing non-invasive attributes; however, this trade-off results in several advantages.