https://github.com/omari-kd/heart-stroke-prediction
The dataset used in this project contains information necessary to predict the occurrence of a stroke.
https://github.com/omari-kd/heart-stroke-prediction
datascience datascience-machinelearning python
Last synced: about 1 month ago
JSON representation
The dataset used in this project contains information necessary to predict the occurrence of a stroke.
- Host: GitHub
- URL: https://github.com/omari-kd/heart-stroke-prediction
- Owner: omari-kd
- Created: 2025-05-28T09:01:15.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-06T17:58:35.000Z (11 months ago)
- Last Synced: 2025-07-06T18:45:04.383Z (11 months ago)
- Topics: datascience, datascience-machinelearning, python
- Language: Jupyter Notebook
- Homepage:
- Size: 1.06 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Heart-Stroke-Prediction
This data science project aims to predict the likelihood of a patient experiencing a stroke based on various input parameters such as gender, age, presence of diseases and smoking status. The dataset provides relevant information about each patient, enabling the development of a predictive model.
According to the World Health Organization (WHO), stroke is the second leading cause of death worldwide, responsible for approximately 11% of total deaths. This project aims to leverage machine learning techniques to build a predictive model that can identify individuals at risk of stroke based on their demographic and health-related features. By detecting high-risk individuals early, appropriate preventive measures can be taken to reduce the incidence and impact of stroke.
# About the dataset
The dataset used in this project contains information necessary to predict the occurrence of a stroke. Each row in the dataset represents a patient, and the dataset includes the following attributes:
- id: Unique identifier
- gender: "Male", "Female" or "Other"
- age: Age of the patient
- hypertension: 0 if the patient doesn't have hypertension, 1 if the patient has hypertension
- heart_disease: 0 if the patient doesn't have any heart diseases, 1 if the patient has a heart disease
- ever_married: "No" or "Yes"
- work_type: "Children", "Govt_job", "Never_worked", "Private" or "Self-employed"
- Residence_type: "Rural" or "Urban"
- avg_glucose_level: Average glucose level in the blood
- bmi: Body mass index
- smoking_status: "Formerly smoked", "Never smoked", "Smokes" or "Unknown"
- stroke: 1 if the patient had a stroke, 0 if not
# Data Visualisation

# Running the Streamlit App
This project includes an interactive web app for predicting stroke risk using a trained machine learning model.
### Requirements
Make sure you have installed the required packages:
```bash
pip install -r requirements.txt
```
### Running the App
```bash
streamlit run app.py
```
App is available at `https://omari-heartstrokeprediction.streamlit.app/`.
# Tools & Technologies
- **Python**: Core language for data analysis and modeling
- `pandas`, `NumPy` — for data manipulation and numerical operations
- `Matplotlib`, `Seaborn` — for data visualization
- `scikit-learn` — for machine learning modeling and evaluation
- **Jupyter Notebook**: For interactive development, analysis and documentation of the data science workflow
- **Streamlit**: For deploying the model as a simple web app
- **VS Code**: Code editing and project management
- **Git & GitHub**: Version control and collaboration
# Contribution
Open to suggestions and improvements! Submit issues or pull requests.