Skip to content

Using the data from the user to predict if the patient has Alzheimer's or not

License

Notifications You must be signed in to change notification settings

Varun-Naik/Alzheimers-Prediction-Application

Repository files navigation

Alzheimers Prediction Application

The aim of this project is to create a Machine Learning model that can take the MRI data of a patient and generate a prediction regarding the diagnosis of Alzheimer's i.e. whether the patient is Demented or Non-demented. Using the data from the user to predict if the patient has Alzheimer's or not

app.py: Contains the fastapi code for the ML model
.ipynb: Contains the machine learning model for Alzheimer's detection
inputs.txt: Contains single example entry

Inputs: Visit, MR Delay, M/F, Hand, Age, EDUC, SES, MMSE, CDR, eTIV, nWBV, ASF

Output: Demented(0) or Nondemented(1) (Group)

Steps followed for creating this project:

  1. Generate a new environment and install necessary libraries
  2. Generate Machine Learning model for the patient data and create pickle file
  3. Create an API using fastapi and test it on http://127.0.0.1:8000/predict or http://127.0.0.1:8000/docs to use the OpenAPI for interactive API.
  4. Create Procfile and Deploy the app on Heroku web server
  5. Use this ML model API link to send a POST request with the inputs in the format specified in inputs.txt as shown below.
  6. If prediction = 0 then patient is Demented and if prediction = 1, patient is Nondemented

img_1.png

Prolems faced

  1. Needed to add the CORS headers to the api to allow access to the html page. This resulted in a 400 bad request error. In order to fix this http://localhost:5000 was added to the whitelist.

References

  1. https://www.geeksforgeeks.org/deploying-ml-models-as-api-using-fastapi/
  2. https://github.com/krishnaik06/FastAPI
  3. How To Deploy Machine Learning Models Using FastAPI-Deployment Of ML Models As API’s
  4. How To Deploy FastAPI Machine Learning Models In Heroku

About

Using the data from the user to predict if the patient has Alzheimer's or not

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages