Introduction: Body mass index (BMI) is an acceptable method to measure overweight and obesity among the population.
Objectives: The aim of this study was evaluating the application of machine learning algorithms for classifying body mass index for clinical purposes.
Patients and Methods: In this descriptive study, we selected the dataset of 1316 people who selected randomly from all area of Ardabil city in Iran. Dataset included demographic and anthropometric data. Classification algorithms such as random forest (RF), Gaussian Naive Bayes (GNB), decision tree (DT), support vector machines (SVM), multi-layer perceptron (MLP), K-nearest neighbors (KNN) and logistic regression (LR) with 10-fold cross-validation were conducted to classify the data based on BMI. The performance of algorithms was evaluated with precision, recall, mean squared errors (MSE) and accuracy indices. All programing done by Python 3.7 in Jupyter Notebook.
Results: According to the BMI, 603(45.8%) of all samples were normal and 713 (54.2%) were at-risk. The precision of RF, GNB, DT, SVM, MLP, KNN and LR for people at risk were 0.93, 0.86, 0.99, 0.82, 100, 0.82 and 0.99 respectively. Additionally, the accuracy of RF, GNB, DT, SVM, MLP, KNN and LR were 95%, 83%, 100%, 82%, 100%, 82% and 100 %.
Conclusion: The comparison of the classifying algorithms showed that, the LR, MLP and DT had the higher accuracy than the other algorithms in detecting of people at-risk.