Skip to content

Comparing 10 different ML classifiers and using the one having best accuracy to predict the stroke risk to user. Fetching user details through web app hosted using Heroku.

License

Notifications You must be signed in to change notification settings

msn2106/Stroke-Prediction-Using-Machine-Learning

Repository files navigation

Stroke Prediction Using Machine Learning

  • By Mayank, Pritika and Shivam | 04/21 - 07/21 | Major Project

Dataset Used:- https://www.kaggle.com/fedesoriano/stroke-prediction-dataset

Description:

In this project we have performed five step process:

    1. Evaluated and analyzed the dataset using seaborn, plotly and matplotlib libraries.
    1. Compared various ML classifiers based on accuracy on our dataset.
    1. Performed k-fold validation and Hyper Parameter Optimization.
    1. Prepared the backend using Flask and linked with front end made using HTML & CSS.
    1. Hosted the project on heroku.

Overview of Project

  • READING DATA AND EXPLORING DATASET
  • BASIC DATA ANALYSIS
  • PANDAS PROFILING
  • CORRELATION
  • ANOMALY DETECTION
  • MISSING VALUES
  • ENCODING
  • TRAIN TEST SPLIT
  • TRAINING THE MODEL
  • SCORES OF MODELS
  • EVALUATION OF MODEL
  • K-FOLD VALIDATION
  • HYPER PARAMETER OPTIMIZATION
  • PREPARATION OF USER GUI
  • INTEGRATION WITH GUI
  • HOSTING

Different Machine Learning Algorithms compared:

    1. Gaussian Naive Bayes
    1. Bernoulli naïve Bayes
    1. Logistic Regression
    1. Support Vector Machines
    1. Random Forest
    1. Decision Tree classifier
    1. K-Nearest Neighbor
    1. Gradient Boosting
    1. Stochastic Gradient Descent
    1. Neural nets

Requirements:-

  • click==8.0.0
  • Flask==2.0.0
  • gunicorn==20.1.0
  • itsdangerous==2.0.0
  • Jinja2==3.0.0
  • joblib==1.0.1
  • Markdown==3.3.4
  • matplotlib==3.4.2
  • matplotlib-inline==0.1.2
  • numpy==1.19.5
  • pandas==1.2.4
  • pandas-profiling==3.0.0
  • plotly==4.14.3
  • plotly-geo==1.0.0
  • preprocessing==0.1.13
  • requests==2.25.1
  • requests-oauthlib==1.3.0
  • scikit-learn==0.24.2
  • seaborn==0.11.1
  • Werkzeug==2.0.0
  • wordcloud==1.8.1
  • xgboost==1.4.2

How to use:

1. Dev:-

    1. Check the requirements
    1. Clone the repository
    1. Open the project directory
    1. Open and run app.py file
    1. A web page will open in the browser, in which you can fill the details and submit
    1. The result of prediction is shown on the next page based on input.

2. User:-

  • Open "strokemsp.herokuapp.com"
  • Fill in the details asked in the form
  • Submit the details, and wait for a while.
  • The model will show whether you are prone to stroke or not.

Results - Coming soon

About

Comparing 10 different ML classifiers and using the one having best accuracy to predict the stroke risk to user. Fetching user details through web app hosted using Heroku.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages