This project involves developing a machine learning model to predict diabetes using a dataset of medical features. The primary goal is to create an accurate and reliable model to identify individuals at risk of diabetes based on various health metrics. In addition to the model, a web application has been developed to allow users to input their health data and receive a prediction of their diabetes risk.
The dataset used in this project is the Diabetes Dataset, which includes the following features:
Pregnancies
Glucose
BloodPressure
SkinThickness
Insulin
BMI
DiabetesPedigreeFunction
Age
Outcome
(target variable: 0 for non-diabetic, 1 for diabetic)
A web application has been built using Flask, allowing users to input their health metrics and receive a diabetes prediction based on the trained Random Forest model. The application is user-friendly and provides both the predicted outcome (diabetic or non-diabetic) and the confidence level of the prediction.
- User Input: Users can input their health metrics such as glucose level, blood pressure, BMI, etc.
- Prediction: The application provides an instant prediction of whether the user is likely to be diabetic.
- Confidence Level: The application also shows the confidence level of the prediction.
- Logistic Regression
- Decision Tree Classifier
- Random Forest Classifier (selected model)
- Neural Network
- Support Vector Classifier
The Random Forest model achieved the following performance metrics:
- Accuracy: 87.28%
- Recall: 81.08%
- Precision: 80.00%
- F1 Score: 80.54%
- ROC AUC: 94.56%
- Clone the repository:
git clone https://github.com/your-username/diabetes-prediction.git
- Navigate to the project directory:
cd diabetes-prediction
- Install the required packages:
pip install -r requirements.txt
- Start flask server:
python app.py
- Open web browser
http://127.0.0.1:5000/diabetes/
to use application.