This project uses a Naive Bayes classifier trained on CDC Diabetes Health Data to predict whether a user is prediabetic or diabetic based on their responses to a series of health-related questions.
- Utilizes CDC Diabetes Health Indicators dataset
- Implements a Naive Bayes classifier optimized for recall
- Balances the dataset using SMOTE (Synthetic Minority Over-sampling Technique)
- Interactive questionnaire for user input
- Provides prediction along with probability of diabetes
- Clone this repository:
git clone https://github.com/sidkrs/diabetes-prediction.git - Navigate to the project directory:
cd diabetes-prediction - Install the required dependencies:
pip install -r requirements.txt
- Run the main script:
python Results.py - Answer the series of health-related questions when prompted.
- The program will provide a prediction on whether you are likely to be prediabetic or diabetic, along with the probability.
Results.py: Main script that loads the model, asks questions, and makes predictionsQuestions.py: Contains the questionnaire logicTesting Best Parameters.py: Script used to find the best parameters for the Naive Bayes modelcleaning_prep_data.ipynb: Jupyter notebook detailing the data cleaning and preparation process
The model is trained on the CDC Diabetes Health Indicators dataset, which has been preprocessed and balanced using SMOTE. The original dataset is not included in this repository due to size constraints.
The program uses a Gaussian Naive Bayes classifier, which has been optimized for recall. This means the model is tuned to minimize false negatives, ensuring that potential cases of diabetes are not missed.