Classification of Obesity among South African Female Adolescents: Comparative Analysis of Logistic Regression and Random Forest Algorithms

Int J Environ Res Public Health. 2023 Dec 19;21(1):2. doi: 10.3390/ijerph21010002.

Abstract

Background: This study evaluates the performance of logistic regression (LR) and random forest (RF) algorithms to model obesity among female adolescents in South Africa.

Methods: Data was analysed on 375 females aged 15-17 from the South African National Health and Nutrition Examination Survey 2011/2012. The primary outcome was obesity, defined as body mass index (BMI) ≥ 30 kg/m2. A total of 31 explanatory variables were included, ranging from socio-economic, demographic, family history, dietary and health behaviour. RF and LR models were run using imbalanced data as well as after oversampling, undersampling, and hybrid sampling of the data.

Results: Using the imbalanced data, the RF model performed better with higher precision, recall, F1 score, and balanced accuracy. Balanced accuracy was highest with the hybrid data (0.618 for RF and 0.668 for LR). Using the hybrid balanced data, the RF model performed better (F1-score = 0.940 for RF vs. 0.798 for LR).

Conclusion: The model with the highest overall performance metrics was the RF model both before balancing the data and after applying hybrid balancing. Future work would benefit from using larger datasets on adolescent female obesity to assess the robustness of the models.

Keywords: South Africa; adolescent; girls; logistic regression; obesity; random forest.

MeSH terms

  • Adolescent
  • Algorithms
  • Female
  • Humans
  • Logistic Models
  • Nutrition Surveys
  • Obesity* / epidemiology
  • Random Forest*
  • South Africa / epidemiology