{"id":28324143,"url":"https://github.com/arashabe/ml_obesity_estimation","last_synced_at":"2026-07-11T21:31:03.450Z","repository":{"id":294640088,"uuid":"979907015","full_name":"arashabe/ML_Obesity_Estimation","owner":"arashabe","description":"This project aims to estimate obesity levels in individuals from Mexico, Peru, and Colombia based on their eating habits and physical condition. Using machine learning classification models, we analyze patterns in the dataset to predict obesity levels with high accuracy.","archived":false,"fork":false,"pushed_at":"2025-06-01T12:47:33.000Z","size":3138,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-15T16:19:40.480Z","etag":null,"topics":["adaboost","cross-validation","machine-learning","random-forest","svm-model"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arashabe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-08T08:58:57.000Z","updated_at":"2025-06-01T12:47:36.000Z","dependencies_parsed_at":"2025-05-22T10:02:42.556Z","dependency_job_id":null,"html_url":"https://github.com/arashabe/ML_Obesity_Estimation","commit_stats":null,"previous_names":["arashabe/ml_obesity_estimation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arashabe/ML_Obesity_Estimation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arashabe%2FML_Obesity_Estimation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arashabe%2FML_Obesity_Estimation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arashabe%2FML_Obesity_Estimation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arashabe%2FML_Obesity_Estimation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arashabe","download_url":"https://codeload.github.com/arashabe/ML_Obesity_Estimation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arashabe%2FML_Obesity_Estimation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35376133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-11T02:00:05.354Z","response_time":104,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adaboost","cross-validation","machine-learning","random-forest","svm-model"],"created_at":"2025-05-25T17:09:58.933Z","updated_at":"2026-07-11T21:31:03.445Z","avatar_url":"https://github.com/arashabe.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Obesity Level Estimation Using Machine Learning**  \n### [Statistical Learning](https://unibg.coursecatalogue.cineca.it/insegnamenti/2024/38091-MOD2/2021/8865/89?coorte=2024\u0026adCodRadice=38091) - Master's in Computer Engineering (Data Science \u0026 Data Engineering Pathway)  \n\n## **Overview**  \nThis project aims to estimate obesity levels in individuals from **Mexico, Peru, and Colombia** based on their **eating habits and physical condition**. Using **machine learning classification models**, patterns in the dataset are analyzed to predict obesity levels with high accuracy.  \n\n## **Dataset Information**  \n- **Source:** [UCI Machine Learning Repository](https://archive.ics.uci.edu/dataset/544/estimation+of+obesity+levels+based+on+eating+habits+and+physical+condition)  \n- **Instances:** 2111  \n- **Features:** 16  \n- **Target Variable:** *NObesity* (Obesity Level)  \n- **Classes:**  \n  - Insufficient Weight  \n  - Normal Weight  \n  - Overweight Level I  \n  - Overweight Level II  \n  - Obesity Type I  \n  - Obesity Type II  \n  - Obesity Type III  \n- **Data Generation:**  \n  - **77% Synthetic** (via Weka \u0026 SMOTE)  \n  - **23% Collected directly** from users via a web platform  \n\n## **Models Applied \u0026 Results**  \n\nSeveral **classification models** were implemented to evaluate predictive performance, leveraging **GridSearchCV for hyperparameter tuning** and **5-fold cross-validation** to ensure generalization.  \n\n### **Performance Summary**  \n\n| Model                | Best Hyperparameters | CV Accuracy (%) | Test Accuracy (%) | Zero-One Loss | F1 Score (%) |\n|----------------------|----------------------|----------------|----------------|--------------|-------------|\n| **Logistic Regression** | ElasticNet (L1/L2) | **87%** | **87.36%** | **66.0** | **87.36%** |\n| **Decision Tree** | Depth = 10, Entropy | **91%** | **93.68%** | **33.0** | **93.68%** |\n| **Random Forest** | 400 Estimators, Entropy | **91%** | **91.95%** | **42.0** | **91.95%** |\n| **SVM** | Linear Kernel, C=5 | **95%** | **96.74%** | **17.0** | **96.74%** |\n| **AdaBoost** | Learning Rate = 0.6, 300 Estimators | **92%** | **88.12%** | **62.0** | **88.12%** |\n\n### **Key Observations**  \n- **SVM achieved the highest test accuracy (96.74%)**, indicating superior generalization.  \n- **Decision Tree performed well (93.68%)**, but showed minor overfitting in training.  \n- **Random Forest provided stable predictions (91.95%)**, with lower variance compared to Decision Tree.  \n- **Logistic Regression**, serving as the baseline, performed moderately (87.36%).  \n- **AdaBoost**, despite strong cross-validation accuracy (92%), exhibited lower test accuracy (88.12%), suggesting generalization challenges.  \n\n## **Methodology**\n1- **Data Preprocessing** → Standardization, PCA for dimensionality reduction, SMOTE for class balancing  \n2- **Model Training** → Decision Tree, Random Forest, AdaBoost, SVM, Logistic Regression  \n3- **Hyperparameter Optimization** → GridSearchCV for best parameter selection  \n4- **Cross-Validation** → 5-Fold CV to ensure robustness  \n5- **Model Evaluation** → Accuracy, F1 Score, Confusion Matrix, Precision, Recall  \n\n## **Installation \u0026 Dependencies**\nTo replicate the project, install the required dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n**Dependencies:**  \n```\nnumpy  \npandas  \nmatplotlib  \nplotly  \nseaborn  \nscikit-learn  \nimbalanced-learn  \nxgboost  \n```\n\n## Running the Project\n1- Clone the repository  \n\n2- Install dependencies  \n```bash\npip install -r requirements.txt\n```\n3- Run the Jupyter Notebook  \n```bash\njupyter notebook\n```\n4- Execute the analysis  \n\n##  Conclusion\nThis project demonstrates the effectiveness of **machine learning** in predicting obesity levels based on dietary and physical behavior data. The **ensemble models (AdaBoost \u0026 SVM) outperform traditional methods**, highlighting the impact of **boosting techniques** in classification problems.  \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farashabe%2Fml_obesity_estimation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farashabe%2Fml_obesity_estimation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farashabe%2Fml_obesity_estimation/lists"}