Logo Lanfrica

Raheesp/ML-XGBOOST-Predict-Diarrhea-Risk

Domain:

healthcare

Record type:

software
Creator:
Rah
Host:
The Effects of Community Health Worker Visits and Primary Care Subsidies on Health Behavior and Health Outcomes for Children in Urban Mali 2014 # πŸ§ͺ Diarrhea Risk Prediction Web App This project is a **Flask-based web application** that uses a trained machine learning model to predict the **risk of diarrhea in children** based on household and healthcare-related information. The data used is from a real-world health study conducted in **Urban Mali, 2014**. ## πŸ“Š Project Overview The application allows users to input various child and household health details and get a **prediction of diarrhea risk (High/Low)** along with a **confidence score**. The model was trained using **XGBoost** and **RFE (Recursive Feature Elimination)** to select the most relevant features. --- ## πŸš€ Features - 🧠 Machine learning model with feature selection (RFE) - 🎯 Risk prediction (High Risk / Low Risk) - πŸ“ˆ Visual confidence score using a dynamic progress bar - πŸ“„ Form inputs with descriptions for easy understanding - πŸ’‘ Animated transitions using CSS - πŸ’» Fully responsive Bootstrap UI --- ## πŸ“ Folder Structure ``` β”œβ”€β”€ app.py # Flask backend β”œβ”€β”€ templates/ β”‚ └── index.html # Main frontend HTML file β”œβ”€β”€ static/ β”‚ └── background/ β”‚ └── image.jpg # Background image for the UI β”œβ”€β”€ capstone_project_1_mali.pkl # Trained ML pipeline (scaler + RFE + XGB) └── README.md # Project overview and documentation ``` --- ## 🧠 Selected Features Used in Model The ML model uses the following 10 features: | Feature Name | Description | |--------------------------|-------------| | `OOccupier` | If the person is the main house owner (1 = Yes, 0 = No) | | `OldFA` | Number of old health program visits (numeric) | | `ageyear_2014` | Age of the child in years as of 2014 | | `vaccine_card_available` | Whether a vaccine card was shown (1 = Yes, 0 = No) | | `child_weighing_type_` | Whether the child was weighed in a clinic (1 = Yes, 0 = No) | | `Changed_water_source` | Whether the water source was changed recently (1 = Yes, 0 = No) | | `A …