## 4 Discussion  
We compared the performance of predictive models, such as RF, LR, XGB, and MLP, using a real-world, large-scale EHR dataset. We observed that the performance of the predicted variables varies from model to model, as it has been reported that no unique algorithm or model works best for every problem. [PERSON] et al. used a support-vector machine model for the clinical intraocular lens calculator [39], while [PERSON] et al. used the random forest method to predict myopia onset [40]. Further, the logistic regression prediction model has been widely used for decision-making and feature selection [41; 42]. [PERSON] et al. have focused on using deep learning methods to improve the selection of patients for the glaucoma surgical intervention [30]. The present study evaluated the performance of four ML models and found that the RF, XGB, and MLP models produced higher prediction accuracy. \begin{table}
\begin{tabular}{l c c c c} \hline  & **Crude OR (95\%CI)** & **Adj. OR (95\%CI)** & **P (Wald’s Test)** & **P (LR-Test\(\emptyset\))** \\ \hline Cataract & 1.19 (1.13,1.25) & 1.36 (1.28,1.43) & \textless{}0.001 & \textless{}0.001 \\ Atherosclerosis & 0.73 (0.66,0.81) & 1.2 (1.07,1.34) & 0.001 & 0.001 \\ Type 2 diabetics & 0.8 (0.77,0.84) & 1.14 (1.08,1.21) & \textless{}0.001 & \textless{}0.001 \\ Obesity & 0.89 (0.84,0.94) & 1.14 (1.07,1.21) & \textless{}0.001 & \textless{}0.001 \\ Lacrimal disorder & 1.28 (1.17,1.4) & 1.14 (1.03,1.26) & 0.008 & 0.008 \\ \hline \end{tabular}
\end{table} 
Table 4: Adjusted odds ratio analysis—1-year data presented only with OR 1.14 and above. \begin{table}
\begin{tabular}{c c c c c c} \hline
**Model** & **TP** & **FP** & **FN** & **TN** & **Accuracy** \\ \hline LR & 2140 & 1235 & 593 & 2754 & 0.7281 \\ RF & 2840 & 530 & 750 & 2602 & 0.8096 \\ XGB & 2826 & 544 & 692 & 2660 & 0.8161 \\ MLP & 2784 & 587 & 659 & 2692 & 0.8146 \\ \hline \end{tabular}
\end{table} 
Table 3: Elements of the confusion metric for evaluating classification models’ performance assessments for four machine learning models. We know that machine learning generally requires a large amount of data, which is a strength of our study. When an outcome depends on a few variables, it is possible to correlate/associate the variables with the disease's phenotype. However, when the result depends on multiple factors with different temporal and spatial weights, it becomes difficult to pinpoint the variables and their dependencies on the prediction. In addition, some ML algorithms perform better than other algorithms with the same set of variables in a dataset41. Within the same input dataset, the current study also shows that XGBoost, random forest, and MLP prediction accuracy outperform the LR model. The classification results are shown in Table 2, and the highest accuracy rate was reported in the RF and XGBoost models at 81% compared to the logistic regression classification. We believe that the reason for the higher accuracy in XGBoost and RF is that they use an ensemble learning approach to discover more predictable variables from the medical dataset. The advantage of using ensemble methods in these algorithms is that they allow for a training model with quantitative and qualitative inputs. Furthermore, without prior domain knowledge, the MLP network model predicts well for generalized data. Additionally, when making predictions, the Random Forest and XGBoost had the majority votes in the terminal vote. On the other hand, it has been reported that logistic regression models perform poorly with binary responses because they estimate whether there is an increase or decrease in the predicted log odds of the response variables while holding all other variables constant. That could be a reason for the lower prediction accuracy rate of 73% with LR in the present study. In the early prediction of glaucoma or any other medical or health-related monitoring, false positive diagnoses can be more beneficial for a patient than false negative predictions.