- Stroke is the 2nd leading cause of death globally, responsible for approximately 11% of total deaths. The given dataset can be used to predict whether a patient is likely to get a stroke based on the input parameters like gender, age, bmi value, various diseases, and smoking status.
- Scikit Learn: ML Library used
- React Js: React Js documentation used
- Flask: Flask framework used
- Pandas: Python data manipulation libraries
- Seaborn: Data visualisation library
This is the main file with all the preprocessing, visualisations, various Machine learning and Deep Learning Models.
- Installing libraries and dependency
- Importing the dataset - Stroke Prediction Dataset
- Exploratory Data Analysis and Visualisation
- Data Preprocessing - Basic preprocessing and cleaning the dataset
- Dividing the dataset into train and test
- Applying Machine Learning models
- Following Models were Implemented:
- Decision Tree Classifier
- Random Forest Classifier
- XGB Classifier
- LGBM Classifier
- Logistic Regression
- SVC
- Decision Tree Classifier(With HyperParameter Tuning)
- Random Forest Classifier(With HyperParameter Tuning)
- XGB Classifier(With HyperParameter Tuning)
- LGBM Classifier(With HyperParameter Tuning)
- Logistic Regression(With HyperParameter Tuning)
- SVC(With HyperParameter Tuning)
- Saving the weights and .pkl file for deployment
- Run the cells according to above mentioned pipeline
- Model with highest accuracy (Random forest classifier) will be saved in .pkl extension.
- Install Node.js and Python on system
- Clone the repository
git clone https://github.com/Yasharya007/Stroke-Prediction.git
cd Stroke-Prediction- Install the required Python packages:
cd Backend
pip install -r requirements.txt- Nevigate to root directory of project and install required npm packages
cd ..
npm i- Nevigate to Client folder and install required npm packages as above
cd Client
npm i- Run the project with following command
npm run dev