3rd Sep 2022
Diabetes Prediction using Support Vector Machine
Support Vector Machine is a supervised classification algorithm where we draw a line between two different categories to differentiate between them.
For this project, we will be building a machine learning model to classify whether the person is a Diabetic or a Non-Diabetic based on certain diagnostic measurements included in the dataset provided by the National Institute of Diabetes and Digestive and Kidney Diseases. Our goal is to work through this notebook by collecting data, preprocessing it, splitting it into testing and training datasets, train the model and evaluate the accuracy of our model.
API
We have created an API using FastAPI for users to interact with. You can run the model using uvicorn on your local machine and test the API, refer to diabetes_api.py & api_testing.py.
uvicorn diabetes_api:app --reload
Also the API is deployed on Heroku with the following URL : https://diabetesmlapi.herokuapp.com/diabetes_prediction
StreamLit Web App
We also created a web app using Streamlit. You can run the app on your local machine using StreamLit and test the web app, refer to diabetes_prediction_web_app.py.
streamlit run diabetes_prediction_web_app.py
The app is deployed on Heroku. Use the following link to explore: Diabetes Prediction Web App
We used the following dataset available on Kaggle to work on this project:
The datasets consists of several medical predictor variables and one target variable, Outcome. Predictor variables includes the number of pregnancies the patient has had, their BMI, insulin level, age, and so on.
Thanks to Kaggle for teaching me ML