π π Exciting News Alert! π
Cardiovascular diseases (CVDs) are the leading cause of death worldwide, claiming an estimated 17.9 million lives each year, which accounts for 31% of all deaths globally. Four out of five CVD deaths are attributed to heart attacks and strokes, with one-third of these fatalities occurring prematurely in individuals under 70 years of age. Heart failure is a common outcome of CVDs, making early detection and management crucial. This project develops a predictive model for heart failure using machine learning techniques to identify high-risk patients and facilitate timely intervention.
The dataset utilized for this model contains 11 key features that are critical in predicting heart disease. These features include:
- Age: Age of the patient (in years)
- Sex: Gender of the patient (M: Male, F: Female)
- ChestPainType: Type of chest pain (TA: Typical Angina, ATA: Atypical Angina, NAP: Non-Anginal Pain, ASY: Asymptomatic)
- RestingBP: Resting blood pressure (in mm Hg)
- Cholesterol: Serum cholesterol (in mg/dl)
- FastingBS: Fasting blood sugar (1: if FastingBS > 120 mg/dl, 0: otherwise)
- RestingECG: Resting electrocardiogram results (Normal, ST: ST-T wave abnormality, LVH: left ventricular hypertrophy)
- MaxHR: Maximum heart rate achieved (numeric value between 60 and 202)
- ExerciseAngina: Exercise-induced angina (Y: Yes, N: No)
- Oldpeak: ST depression (numeric value)
- ST_Slope: Slope of the peak exercise ST segment (Up, Flat, Down)
- HeartDisease: Output class (1: heart disease, 0: Normal)
This dataset is a comprehensive compilation created by merging five existing heart disease datasets, making it the largest heart disease dataset available for research purposes. The datasets used in this curation are:
- Cleveland: 303 observations
- Hungarian: 294 observations
- Switzerland: 123 observations
- Long Beach VA: 200 observations
- Stalog (Heart) Data Set: 270 observations
In total, the combined dataset contains 1,190 observations, with 272 duplicates removed, resulting in a final dataset of 918 observations.
- Data Utilization: The model leverages this comprehensive dataset, which includes various patient attributes, allowing for precise risk assessment.
- Algorithm Performance: We evaluated several algorithms, determining that the Random Forest method performed best, achieving an AUC-ROC score of 0.89 and an accuracy of 0.93. The Neural Network model followed closely, with an accuracy of 0.86.
- Real-Time Assessments: Implemented through an intuitive Streamlit application, the model enables healthcare professionals to input patient data and receive real-time risk assessments, facilitating personalized treatment strategies tailored to individual patient needs.
- Early Identification: The predictive model plays a crucial role in the early identification of individuals at risk for heart failure, which is essential for timely intervention and management.
- Personalized Care: By supporting individualized treatment plans, the model has the potential to reduce the frequency of severe heart failure episodes, leading to better patient outcomes.
- Clinical Applicability: Future enhancements will focus on expanding the dataset and integrating real-time data from multiple hospitals, further improving the modelβs accuracy and practical application in clinical settings.
- Hardware: Laptop with at least 8GB of RAM and 500GB of storage.
- Operating System: Windows.
- Software:
- Python (preferably with Anaconda)
- Libraries: Pandas, NumPy, Scikit-learn, Matplotlib, Seaborn, Streamlit
Follow these steps to get a local copy of the project:
-
Clone the repository:
git clone https://github.com/yourusername/heart-failure-predictive-model.git
-
Navigate to the project directory:
cd heart-failure-predictive-model
-
Install the required packages:
pip install -r requirements.txt
-
Run the Streamlit application:
streamlit run app.py
-
Open your browser and go to
http://localhost:8501
to view the application.
- Input anonymized patient data into the Streamlit application.
- Receive real-time risk assessments and tailored recommendations for heart failure management.
Note: This project uses Python for backend processing and Streamlit for the front end, along with libraries like Pandas and Scikit-learn for machine learning.
- π©Ί Risk Assessment: Provides real-time risk assessments for heart failure based on patient data.
- π Model Evaluation: Allows users to explore model performance metrics and validation results.
- ποΈ User-Friendly Interface: Simple and intuitive interface for healthcare professionals.
- π Data Visualization: Displays key insights and trends through interactive graphs and charts.
- π Personalized Recommendations: Generates individualized treatment strategies based on risk profiles.
The Predictive Modeling for Heart Failure project aims to leverage machine learning to identify high-risk patients and facilitate early interventions. By analyzing anonymized patient data, the model provides healthcare professionals with valuable insights to improve patient outcomes.
The project is currently in the development phase, with core features implemented and undergoing testing. π οΈ
To enhance the model's performance and its utility in clinical environments, we plan to:
- π Expand the dataset by including a diverse range of anonymized patient records from different healthcare institutions. π
- π Integrate real-time patient data to allow dynamic risk assessments and improve the model's predictive capabilities. β±οΈ
- π Continuously refine algorithms and evaluate additional machine learning techniques to optimize accuracy and reliability. π
Future enhancements could also include:
- π¨ Improved user interface for a better user experience. π₯οΈ
- π Enhanced security features for data protection. π
- π Advanced machine learning models to further enhance predictive accuracy. π€
- π Wider accessibility to ensure healthcare professionals can easily utilize the model. π²
- π Comprehensive documentation to assist users in understanding and implementing the model effectively. π
The project aims to develop a predictive model for heart failure using machine learning techniques, providing healthcare professionals with essential tools to identify high-risk patients and facilitate early intervention. Ongoing development will focus on enhancing model accuracy, expanding the dataset, and integrating real-time patient data to improve clinical applicability. π
This project serves as a platform for utilizing machine learning in healthcare, specifically targeting heart failure prediction. By analyzing anonymized patient dataβsuch as demographics, medical histories, and clinical assessmentsβthe model empowers healthcare professionals to make informed decisions and improve patient outcomes. π
Role | GitHub | ||
---|---|---|---|
Project Admin | GitHub | [email protected] | |
Member | GitHub | [email protected] | |
Member | GitHub | [email protected] |
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- If you have suggestions for the project, such as reporting a bug, improving the model, or enhancing the README.md file, feel free to open an issue or create a pull request with the necessary changes.
- Please ensure that your code is well-commented and follows Python best practices.
- Create individual pull requests for each suggestion to keep changes focused and manageable.
Your involvement helps to improve the project and make it better for everyone. Thank you for your contributions!
Kindly go through CONTRIBUTING.md to understand everything from setup to contributing guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
We would like to thank all the researchers and institutions that contributed to the availability of anonymized patient datasets, as well as the open-source community for their invaluable libraries and tools.
π Project Presentation
Check out our PowerPoint presentation for a detailed overview of the project! π
π Project Website Overview
Explore our project website for a comprehensive overview of all the details, features, and updates! π Dive into sections like project goals, milestones, team introductions, and much more to get a clear understanding of what weβre working on.
You can view the project PDF in an interactive flip book format here: