This repository contains the code and resources for predicting diabetes using a Support Vector Classifier model. The project is implemented in Python, utilizing libraries such as pandas, scikit-learn, and Flask for web deployment.
- Project Overview
- Dataset
- Model Training
- Web Application
- Setup and Installation
- Usage
- Results
- Contributing
The goal of this project is to create a predictive model that can classify whether a person has diabetes based on various medical parameters. The Support Vector Classifier algorithm is used due to its effectiveness in binary classification problems.
The dataset used for this project is located in the Dataset
folder. It includes several features such as:
- Pregnancies
- Glucose
- BloodPressure
- SkinThickness
- Insulin
- BMI
- DiabetesPedigreeFunction
- Age
- Outcome (target variable)
The Notebooks
folder contains Jupyter notebooks used for data exploration, preprocessing, and model training. Key steps include:
- Data Cleaning
- Exploratory Data Analysis (EDA)
- Feature Scaling
- Model Training and Evaluation
The trained model is saved in the Model
folder.
The project includes a Flask web application to allow users to input medical parameters and receive diabetes predictions. The app's files are:
app.py
: Main application filetemplates/index.html
: HTML template for the web interface
To run the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/gaurav-bhadane/Diabetes_Predicton.git cd Diabetes_Predicton
-
Create a virtual environment and activate it:
python3 -m venv venv source venv/bin/activate
-
Install the required packages:
pip install -r requirements.txt
-
Run the Flask application:
python app.py
- Open your web browser and go to
http:https://127.0.0.1:5000/
. - Input the required medical parameters in the form.
- Click "Predict" to see if the individual is likely to have diabetes.
The model's performance metrics, such as accuracy, precision, recall, and F1-score, are detailed in the Jupyter notebooks. These metrics help evaluate the effectiveness of the Support Vector Classifier model in predicting diabetes.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
Feel free to explore the repository and provide feedback or raise issues if you encounter any problems. Happy coding!