Skip to content

Repository files navigation

🧠 Stroke Prediction Analysis & Web App

An End-to-End Machine Learning Project to Predict Stroke Probability


Python Jupyter Notebook Scikit-Learn Streamlit

📖 Project Overview

Stroke is a leading cause of death and disability globally. This project aims to build an end-to-end Machine Learning pipeline to predict whether a patient is likely to get a stroke based on various health parameters like gender, age, medical conditions, and smoking status.

The project goes beyond just data analysis and model training; it includes deploying the best-performing model (.pkl file) via an interactive Streamlit Web Application, allowing users to input medical data and get real-time stroke predictions.


✨ Key Features

  • Exploratory Data Analysis (EDA): Deep dive into patient data to uncover patterns and correlations using Pandas and Data Visualization libraries.
  • Data Preprocessing: Handling missing values, encoding categorical variables, and scaling features for optimal model performance.
  • Predictive Modeling: Training and evaluating various Machine Learning algorithms to find the most accurate model for stroke prediction.
  • Interactive Web UI: A user-friendly Streamlit application that utilizes the trained model to make on-the-fly predictions.

📂 Project Structure

Stroke_Prediction_Analysis/
├── healthcare-dataset-stroke-data.csv     # Raw dataset
├── preprocessed_stroke_data.csv           # Cleaned and processed dataset
├── ML Models For Stroke Predictions.ipynb # Jupyter Notebook containing EDA & Modeling
├── ML_Model_For_Stroke_predection.pkl     # Serialized (trained) Machine Learning model
├── streamlit_app.py                       # Streamlit application script
└── README.md                              # Project documentation

🛠️ Technologies Used

Python Jupyter Notebook Scikit-Learn Streamlit Pandas NumPy

🚀 Installation & Usage

To run this project locally, follow these steps:

1. Clone the repository

git clone [https://github.com/MahmoudAhmmed/Stroke_Prediction_Analysis.git](https://github.com/MahmoudAhmmed/Stroke_Prediction_Analysis.git)
cd Stroke_Prediction_Analysis

2. Install required libraries Ensure you have Python installed, then run:

pip install pandas numpy scikit-learn streamlit

3. Run the Streamlit Web App To launch the interactive application, run the following command in your terminal:

streamlit run streamlit_app.py

The app will open automatically in your default web browser at http://localhost:8501.


🤝 Let's Connect!

About

An end-to-end Machine Learning project predicting stroke probability using patient health data and an interactive Streamlit web app

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages