Skip to content

Abdulazizzn/Storke_Prediction

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stroke Prediction Using Machine Learning

This repository is the official implementation of our Stroke Prediction project.

In this project, we used two different models, Logistic Regression and XGBoost, to predict the occurrence of stroke based on various health parameters. The XGBoost model achieved higher accuracy.

Data

The data used for training the models was obtained from two different datasets available on Kaggle.

Requirements

This project requires Python 3.6 or later. The dependencies for the project are listed in the requirements.txt file.

Using pip

You can install the requirements via pip using the following command:

pip install -r requirements.txt

Using Conda

If you are using Conda, you can create a new environment for this project and install the requirements using the following commands:

conda create -n stroke_prediction python=3.8
conda activate stroke_prediction
pip install -r requirements.txt

This will create a new Conda environment called "stroke_prediction" and install the necessary packages within that environment.

Project Structure

The entire project is contained within a single Jupyter notebook: main.ipynb. This notebook includes all the steps from data loading, preprocessing, model training, evaluation, and results visualization.

Demo

We have a live demo of the model hosted on Hugging Face using Gradio. You can interact with the model and make predictions in real-time.

Demo on HuggingFace

Pre-trained Models

You can download our pre-trained models here:

Results

Our XGBoost model achieved higher accuracy in predicting stroke occurrence in Kaggle competetion:

Model name Accuracy
Logistic Regression (0.88975)
XGBoost (0.89516)

Contributing

Authors

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%