Behind every piece of data, a type of obesity. Behind the model, a real solution.
Welcome to Keep In Shape, an application that uses multiclass ML techniques to predict people's obesity risk based on lifestyle and eating habits data. This tool is designed to help healthcare professionals and users interested in monitoring and managing obesity-related risks.
- π§ Intelligence for Health
- π Project Background
- π» Key Features
- βοΈ Tech Stack
- π Project Structure
- π Installation & Usage
- π About our model
- π₯ Development Team
- π€ Contributing
Check out the demo of our app
Details about:
- Exploratory Data Analysis
- Algorithm experimentation XGBoost
- Model evaluation metrics
- Development of the web application
- Please visit our technical report for a detailed overview of the project.
- Interactive dashboard
- User scenario simulator
- Personalized health recommendations
- Persistent prediction history (supabase)
- Intuitive user interface
- Dockerized deployment
multiclass_prediction_obesity_risk/
βββ client/ # User interface
β βββ media/ # Static assets (images, etc.)
βββ data/ # Project data
β βββ raw/ # Original dataset
β βββ processed/ # Processed dataset
βββ docs/ # Project documentation
βββ server/ # Backend and model logic
β βββ model/ # Trained models and utilities
β βββ utils/ # Helper functions
βββ tests/ # Automated tests
βββ .gitignore # Files ignored by Git
βββ pyproject.toml # Project configuration
βββ requirements.txt # Project dependencies
βββ README.md # Main documentation
βββ Dockerfile # Containerization setup
git clone https://github.com/fergarcat/multiclass_prediction_obesity_risk.git
cd multiclass_prediction_obesity_risk
python3 -m venv .venv
macOS/Linux:
source .venv/bin/activate
Windows:
.venv\Scripts\activate
pip install -r requirements.txt
π‘ TIP:
Usepip list
to see all installed dependencies.
Duplicate the env_example
file, rename it to .env
python run_client.py
Run the following command to build and start the containers:
docker-compose up --build
python -m unittest discover tests
We compared several models to determine which one performed best. You can see the results in this notebook.
Model | Accuracy | Precision | Recall | F1-Score | Train Time (s) | Overfitting |
---|---|---|---|---|---|---|
XGBoost | 0.9073 | 0.9070 | 0.9073 | 0.9071 | 2.4346 | 0.0769 |
CatBoost | 0.9061 | 0.9056 | 0.9061 | 0.9058 | 35.4323 | 0.0483 |
LightGBM | 0.9051 | 0.9048 | 0.9051 | 0.9049 | 4.7564 | 0.0711 |
Random Forest | 0.9037 | 0.9030 | 0.9037 | 0.9031 | 3.8831 | 0.0962 |
SVM (RBF) | 0.8832 | 0.8822 | 0.8832 | 0.8826 | 5.1034 | 0.0137 |
SVM (Linear) | 0.8697 | 0.8684 | 0.8697 | 0.8688 | 5.1625 | -0.0029 |
Logistic Regression | 0.8639 | 0.8624 | 0.8639 | 0.8629 | 0.7557 | -0.0013 |
Decision Tree | 0.8408 | 0.8404 | 0.8408 | 0.8404 | 0.1659 | 0.1591 |
KNN | 0.7936 | 0.7906 | 0.7936 | 0.7908 | 0.2451 | 0.0574 |
Naive Bayes | 0.7755 | 0.7710 | 0.7755 | 0.7691 | 0.0260 | -0.0024 |
Model | Accuracy | Precision | Recall | F1-Score | Train Time (s) | Overfitting |
---|---|---|---|---|---|---|
XGBoost (Adjusted) | 0.9053 | 0.9048 | 0.9053 | 0.9050 | 5.4682 | 0.0097 |
Logistic Regression (Adjusted) | 0.8639 | 0.8639 | 0.8639 | 0.8633 | 0.7708 | 0.0002 |
Model | Accuracy | Precision | Recall | F1-Score | Train Time (s) | Overfitting |
---|---|---|---|---|---|---|
XGBoost + Optuna | 0.9118 | 0.9117 | 0.9118 | 0.9116 | 4.1328 | 0.0185 |
Name | GitHub |
---|---|
Fernando GarcΓa CatalΓ‘n | fergarcat |
Anca Bacria | a-bac-0 |
Omar Lengua | Omarlsant |
Abigail Masapanta | abbyenredes |
Contributions are welcome! To contribute:
-
Fork this repository.
-
Create a new branch:
git checkout -b feature/new-feature
-
Make your changes and commit them:
git commit -m "Add new feature"
-
Submit a pull request π
If you have any questions, feel free to open an issue in the repository or contact us.