Patient Readmission Prediction
This project predicts patient readmissions using machine learning. It includes a Flask API for making predictions and a Streamlit dashboard for interactive visualization.
DEMO!
Table of Contents
Project Overview
The goal of this project is to predict whether a patient will be readmitted to the hospital based on their medical data. The project includes:
- A machine learning model trained on patient data.
- A Flask API to serve predictions.
- A Streamlit dashboard for interactive predictions and visualization.
Setup Instructions
Step 1: Clone the Repository
Clone the repository and navigate to the project directory:
git clone https://github.com/your-username/PatientReadmissionPrediction.git
cd PatientReadmissionPrediction
Step 2: Install Dependencies
Create a virtual environment (optional but recommended):
Copy
python -m venv venv
source venv/bin/activate # For Linux/Mac
venv\Scripts\activate # For Windows
Install the required libraries:
Copy
pip install -r requirements.txt
Step 3: Download the Dataset
Download the dataset from the UCI Repository or Kaggle. Rename the dataset to diabetes_data.csv. Place it in the data/ folder.
Step 4: Train the Model
Run the script to preprocess the data, train the model, and save it:
Copy
python app/model.py
Step 5: Start the Flask API
Run the Flask app to serve predictions:
Copy
python app/web_service.py
Step 6: Launch the Streamlit Dashboard
Run the Streamlit app for interactive predictions:
Copy
streamlit run dashboard/streamlit_app.py
File Descriptions
Project Structure
PatientReadmissionPrediction/
├── data/
│ └── diabetes_data.csv # Dataset for training and testing
├── app/
│ ├── __init__.py # Empty file for package initialization
│ ├── model.py # Code for preprocessing, training, and saving the model
│ └── web_service.py # Flask API for serving predictions
├── dashboard/
│ └── streamlit_app.py # Streamlit dashboard for interactive predictions
├── requirements.txt # List of dependencies
└── README.md # Project documentation
Contributing
Contributions are welcome! Follow these steps to contribute:
Fork the repository.
Create a new branch:
Copy
git checkout -b feature/your-feature-name
Commit your changes:
Copy
git commit -m "Add your message here"
Push to the branch:
Copy
git push origin feature/your-feature-name
Open a pull request.
Contact
For questions or feedback, please contact:
Your Name: rsuhas319@gmail.com
GitHub: suhas-ramesha
Log in or sign up for Devpost to join the conversation.