Skip to content

This repository contains the code for a machine learning project - Diabetes Prediction. In this project, a model is built to find the relationship between the features and the associated outcome and classify the patient as Diabetic or Non-Diabetic. The Gaussian Naive Bayes Classifier Model is used for this purpose.

Notifications You must be signed in to change notification settings

deepankarvarma/Diabetes-Prediction-Using-Binary-Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Diabetes Prediction Using Naive Bayes Classifier

This repository contains code for building a model that finds the relationship between the features of a patient and the associated outcome (diabetic or non-diabetic). The code uses a Gaussian Naive Bayes classifier model to classify patients as diabetic or non-diabetic.

Dataset

The dataset used in this project can be found on Kaggle at https://www.kaggle.com/datasets/kandij/diabetes-dataset. The dataset contains information about patients, including their glucose level, blood pressure, BMI, and other medical details.

Usage

To run the code, simply run the model.py file. The code will load the diabetes dataset, split the data into training and testing sets, and create a Gaussian Naive Bayes classifier model. The model is then trained on the training data and used to predict the outcomes of the testing data. Finally, the accuracy of the model is evaluated and printed to the console.

You can also visit the website hosted on Streamlit at https://deepankarvarma-diabetes-prediction-using-regression-app-3h8wq7.streamlit.app/. The website allows you to enter medical details about a patient and get a prediction about whether they are diabetic or non-diabetic.

Requirements

The code was written in Python 3. The following Python libraries are required:

  1. pandas
  2. sklearn
  3. seaborn
  4. matplotlib
  5. streamlit

Running the Code

To run the code, simply run the model.py file. The code will load the diabetes dataset, split the data into training and testing sets, and create a Gaussian Naive Bayes classifier model. The model is then trained on the training data and used to predict the outcomes of the testing data. Finally, the accuracy of the model is evaluated and printed to the console.
To run the website, use the following command:

streamlit run app.py

This will start the Streamlit server and open the website in your default web browser. From there, you can enter medical details about a patient and get a prediction about whether they are diabetic or non-diabetic.

About

This repository contains the code for a machine learning project - Diabetes Prediction. In this project, a model is built to find the relationship between the features and the associated outcome and classify the patient as Diabetic or Non-Diabetic. The Gaussian Naive Bayes Classifier Model is used for this purpose.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages