{"id":18898506,"url":"https://github.com/msaf9/heart-risk-assessment","last_synced_at":"2026-04-25T12:32:34.447Z","repository":{"id":244872547,"uuid":"799409267","full_name":"msaf9/heart-risk-assessment","owner":"msaf9","description":"This repository contains the code and documentation for a heart disease prediction model using machine learning techniques. The goal of this project is to build a model that can predict the presence of heart disease based on various patient attributes such as age, sex, cholesterol levels, and other medical indicators.","archived":false,"fork":false,"pushed_at":"2024-06-30T17:36:02.000Z","size":524,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-31T19:26:11.985Z","etag":null,"topics":["machine-learning","python"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msaf9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-12T03:49:58.000Z","updated_at":"2024-06-30T17:36:06.000Z","dependencies_parsed_at":"2024-11-08T08:43:04.343Z","dependency_job_id":"2d52e9a2-43e0-4fef-879e-76cc3342babb","html_url":"https://github.com/msaf9/heart-risk-assessment","commit_stats":null,"previous_names":["msaf9/heart-risk-assessment"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/msaf9/heart-risk-assessment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msaf9%2Fheart-risk-assessment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msaf9%2Fheart-risk-assessment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msaf9%2Fheart-risk-assessment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msaf9%2Fheart-risk-assessment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msaf9","download_url":"https://codeload.github.com/msaf9/heart-risk-assessment/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msaf9%2Fheart-risk-assessment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32262801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["machine-learning","python"],"created_at":"2024-11-08T08:42:58.682Z","updated_at":"2026-04-25T12:32:34.425Z","avatar_url":"https://github.com/msaf9.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Heart Risk Assessment Model\r\n\r\nThis repository contains a machine learning project for predicting heart disease using patient data. The project involves data preprocessing, exploratory data analysis, model selection, training, evaluation, and deployment.\r\n\r\n## Table of Contents\r\n\r\n- [Introduction](#introduction)\r\n- [Dataset](#dataset)\r\n- [Installation](#installation)\r\n- [Usage](#usage)\r\n- [Project Structure](#project-structure)\r\n- [Modeling](#modeling)\r\n- [Results](#results)\r\n- [Contributing](#contributing)\r\n- [License](#license)\r\n\r\n## Introduction\r\n\r\nHeart disease is one of the leading causes of death worldwide. Early prediction of heart disease can help in taking preventive measures and saving lives. This project aims to build a machine learning model to predict the presence of heart disease based on various patient attributes.\r\n\r\n## Dataset\r\n\r\nThe dataset used in this project contains the following attributes:\r\n\r\n1. **age**: Age in years\r\n2. **sex**: Sex (1 = male; 0 = female)\r\n3. **chest pain type**: Chest pain type (1-4)\r\n4. **resting bp s**: Resting blood pressure in mm Hg\r\n5. **cholesterol**: Serum cholesterol in mg/dl\r\n6. **fasting blood sugar**: Fasting blood sugar (1 if \u003e 120 mg/dl, 0 otherwise)\r\n7. **resting ecg**: Resting electrocardiogram results (0-2)\r\n8. **max heart rate**: Maximum heart rate achieved\r\n9. **exercise angina**: Exercise induced angina (1 = yes; 0 = no)\r\n10. **oldpeak**: ST depression induced by exercise relative to rest\r\n11. **ST slope**: The slope of the peak exercise ST segment (0-2)\r\n12. **target**: Presence of heart disease (1 = yes; 0 = no)\r\n\r\n## Installation\r\n\r\nTo run this project, you will need Python and the following libraries:\r\n\r\n- pandas\r\n- numpy\r\n- scikit-learn\r\n- matplotlib\r\n\r\nYou can install the required libraries using pip:\r\n\r\n```bash\r\npip install pandas numpy scikit-learn matplotlib\r\n```\r\n\r\n## Usage\r\n1. Clone the repository:\r\n\r\n```bash\r\ngit clone https://github.com/your-username/HeartDiseasePrediction.git\r\ncd HeartDiseasePrediction\r\n```\r\n2. Run the Jupyter Notebook or Python script to see the data processing, model training, and evaluation:\r\n\r\n```bash\r\njupyter notebook notebooks/heart_disease_prediction.ipynb\r\n```\r\n\r\n3. To preprocess data, train models, and make predictions, run:\r\n\r\n```bash\r\npython scripts/heart_disease_prediction.py\r\n```\r\n\r\n## Project Structure\r\n\r\n```tree\r\nHeartDiseasePrediction/\r\n├── data/\r\n│   └── heart_disease_data.csv\r\n├── notebooks/\r\n│   └── heart_disease_prediction.ipynb\r\n├── scripts/\r\n│   └── heart_disease_prediction.py\r\n├── models/\r\n│   └── trained_model.pkl\r\n├── README.md\r\n└── requirements.txt\r\n```\r\ndata/: Contains the dataset.\r\n\r\nnotebooks/: Jupyter Notebook with detailed steps and explanations.\r\n\r\nscripts/: Python scripts for data preprocessing, model training, and evaluation.\r\n\r\nmodels/: Saved trained models.\r\n\r\nrequirements.txt: List of required libraries.\r\n\r\n## Modeling\r\n\r\nThe following steps are involved in the modeling process:\r\n\r\n1. Data Preprocessing\r\n2. Exploratory Data Analysis (EDA)\r\n3. Feature Selection\r\n4. Model Training (Logistic Regression, Decision Tree, Random Forest, etc.)\r\n5. Model Evaluation (Accuracy, Precision, Recall, F1-Score, ROC-AUC)\r\n\r\n## Results\r\n\r\nThe final model achieved an accuracy of **`87.39%`** on the test set. Detailed evaluation metrics and plots are provided in the notebook and script.\r\n\r\n## License\r\n[MIT License](LICENSE)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsaf9%2Fheart-risk-assessment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsaf9%2Fheart-risk-assessment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsaf9%2Fheart-risk-assessment/lists"}