The Diabetes Treatment Planner is a machine learning-based healthcare application that helps assess diabetes risk and provide personalized treatment recommendations.
The system analyzes patient health parameters and predicts diabetes risk using trained machine learning models. Based on the prediction, the application generates actionable treatment suggestions and visualizes health metrics.
The application is built with Streamlit to provide an interactive interface for healthcare practitioners and researchers.
- Python
- Streamlit
- Scikit-learn
- Pandas
- Plotly
- NumPy
The system follows a typical machine learning workflow:
Patient Health Data ↓ Data Preprocessing ↓ Feature Engineering ↓ Model Training ↓ Risk Prediction ↓ Treatment Recommendation
The model uses data inspired by the NHANES (National Health and Nutrition Examination Survey) dataset.
Features used for prediction include:
- Age
- Body Mass Index (BMI)
- Blood Pressure
- Glucose Level
- HDL Cholesterol
- Triglycerides
These features are commonly used indicators for evaluating diabetes risk.
Multiple machine learning models were explored:
- Logistic Regression
- Random Forest
- Gradient Boosting
The final model was selected based on performance on validation data.
The trained model was evaluated using standard classification metrics.
Example performance:
Accuracy: 87% Precision: 85% Recall: 84% F1 Score: 84%
Users can enter patient health information including:
- Age
- BMI
- Blood pressure
- Glucose level
- Cholesterol levels
The system evaluates diabetes risk based on the input features.
Based on the prediction, the system provides:
- lifestyle recommendations
- treatment guidance
- risk management suggestions
Interactive charts are generated using Plotly to visualize patient health metrics.
Clone the repository
git clone https://github.com/anujpratap12/Diabetic-Treatment-Planner
Install dependencies
pip install -r requirements.txt
Run the Streamlit application
streamlit run app.py
Open the browser and navigate to:
http://localhost:8501
This interface allows healthcare professionals to enter patient health metrics such as age, BMI, blood pressure, and lifestyle indicators to generate a personalized treatment plan.
The system analyzes patient health indicators and estimates the probability of diabetes risk.
It classifies the patient into categories such as Normal, Pre-diabetes, or Diabetes.
Based on the predicted risk level, the system generates personalized treatment recommendations including:
- Medication suggestions
- Lifestyle modifications
- Dietary changes
- Monitoring guidelines
Possible improvements include:
- training on larger healthcare datasets
- adding deep learning models
- integrating real-time health monitoring
- deploying the application on cloud platforms
Anuj Pratap Singh Final Year Computer Science Student Interested in AI, Machine Learning, and Healthcare Applications


