**5. Conclusions**

Obesity is a major public health problem worldwide. The prevalence of obesity has increased dramatically in the past few decades, especially during the COVID-19 pandemic. It is now considered a global epidemic. This is problematic for several reasons, e.g., there is an increased risk of developing serious health conditions, such as heart disease and diabetes. Therefore, we proposed a real-time expert system that successfully determines the possible threat factors related to obesity and being overweight. Several statistical, machine learning, and data visualization methods have been applied to publicly accessible obesity datasets. We performed a fair comparison of machine learning algorithms in terms of precision, recall, F1 score, and accuracy. From the list of proposed algorithms, the SVM outperforms its counterpart schemes. In case of error rates, the following statistical measurements were considered: MBE (MJ/m2), RMSE (MJ/m2), MABE (MJ/m2), and R2. In MBE (MJ/m2), SVM has the lowest error rate nearer to zero, while for RMSE (MJ/m2), MABE (MJ/m2), and R2—random forest has a better performance compared to the others. Our expert system takes input from users via a web interface and passes the data to multiple algorithms to make a classification report. This report will be sent to the patient's doctor for necessary actions. In this way, we can easily entertain obesity cases in the initial stages.

**Author Contributions:** Conceptualization, A.S. and S.A.A.; methodology, A.S., T.A. and A.M.A.; software, A.S. and M.I.; validation, M.I., M.Y.A. and T.A.; investigation, M.Z. and S.A.A.; resources, M.I.; data curation, A.S. and M.A.; writing—original draft preparation, M.Z. and A.M.A.; writing review and editing, T.A., A.S. and M.Y.A.; visualization, A.S. and M.I.; supervision, M.I. and T.A.; project administration, S.A.A.; funding acquisition, S.A.A. and M.I. All authors have read and agreed to the published version of the manuscript.

**Funding:** The authors acknowledge the support from the Deputy for Research and Innovation-Ministry of Education, Kingdom of Saudi Arabia (grant NU/IFC/ENT/01/020) under the institutional funding committee at Najran University, Kingdom of Saudi Arabia.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** The dataset can be downloaded from the following link: https://archive.ics. uci.edu/ml/datasets/Estimation+of+obesity+levels+based+on+eating+habits+and+physical+condition+ (accessed on 1 June 2022).

**Acknowledgments:** The authors acknowledge the support from the Deputy for Research and Innovation-Ministry of Education, Kingdom of Saudi Arabia (grant NU/IFC/ENT/01/020) under the institutional funding committee at Najran University, Kingdom of Saudi Arabia.

**Conflicts of Interest:** The authors declare no conflict of interest.
