{"id":20847460,"url":"https://github.com/ansh420/heart-attack-prediction","last_synced_at":"2025-07-29T06:33:43.081Z","repository":{"id":155906138,"uuid":"578423813","full_name":"Ansh420/Heart-attack-prediction","owner":"Ansh420","description":"Predicting whether a patient has 10-year risk of developing coronary heart disease(CHD) using different Machine Learning techniques.","archived":false,"fork":false,"pushed_at":"2024-10-27T06:47:22.000Z","size":1631,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-07T20:43:42.368Z","etag":null,"topics":["gui","machine-learning","prediction"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ansh420.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-12-15T02:43:46.000Z","updated_at":"2024-10-27T06:47:25.000Z","dependencies_parsed_at":"2025-03-12T11:44:43.789Z","dependency_job_id":"a2b61542-67fb-42e0-9e96-f42e544bec01","html_url":"https://github.com/Ansh420/Heart-attack-prediction","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ansh420/Heart-attack-prediction","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ansh420%2FHeart-attack-prediction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ansh420%2FHeart-attack-prediction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ansh420%2FHeart-attack-prediction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ansh420%2FHeart-attack-prediction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ansh420","download_url":"https://codeload.github.com/Ansh420/Heart-attack-prediction/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ansh420%2FHeart-attack-prediction/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267639569,"owners_count":24119780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["gui","machine-learning","prediction"],"created_at":"2024-11-18T02:20:44.194Z","updated_at":"2025-07-29T06:33:43.053Z","avatar_url":"https://github.com/Ansh420.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"![heart_disease_prediction_logo2_](https://github.com/user-attachments/assets/d616f6d6-ad33-4848-9114-60a0772dd6ca)\n\n# Heart-attack-prediction\n\nThe silver lining is that heart attacks are highly preventable and simple lifestyle modifications(such as reducing alcohol and tobacco use; eating healthily and exercising) coupled with early treatment greatly improves its prognosis. It is, however, difficult to identify high risk patients because of the multi-factorial nature of several contributory risk factors such as diabetes, high blood pressure, high cholesterol, et cetera. This is where machine learning and data mining come to the rescue.\n\nDoctors and scientists alike have turned to machine learning (ML) techniques to develop screening tools and this is because of their superiority in pattern recognition and classification as compared to other traditional statistical approaches.\n\nI will be giving you a walk through on the development of a screening tool for predicting whether a patient has 10-year risk of developing **coronary heart disease(CHD)** using different Machine Learning techniques.\n## Prerequisites\n\nBefore you can run the code, ensure you have the following installed:\n\n- Python 3.6 or later.\n- NumPy.\n- pandas.\n- scikit-learn.\n- matplotlib.\n- seaborn.\n\n![1-s2 0-S0010482521004662-gr1](https://github.com/user-attachments/assets/4f435770-687e-4c27-a481-d43855d58610)\n\n## Dataset\nThe dataset used for training and evaluation is assumed to be in a CSV format. It should contain the following columns:\n\n- **age**: Age of the patient\n\n- **sex**: 1 for male, 0 for female\n\n- **cp**: Chest pain type (1-4)\n\n- **trestbps**: Resting blood pressure\n\n- **chol**: Serum cholesterol\n\n- **fbs**: Fasting blood sugar (1 if \u003e 120 mg/dl, 0 otherwise)\n\n- **restecg**: Resting electrocardiographic results (0, 1, 2)\n\n- **thalach**: Maximum heart rate achieved\n\n- **exang**: Exercise-induced angina (1: yes, 0: no)\n\n- **oldpeak**: ST depression induced by exercise \n\n- **slope**: Slope of the ST segment (0, 1, 2)\n\n- **ca**: Number of major vessels colored by fluoroscopy\n\n- **thal**: Thallium stress test result (0, 1, 2, 3)\n\n- **target**: 1 for heart attack, 0 for no heart attack\n\n## Usage\nClone the Repository:\n\n $ Bash\n \n$ git clone **https://github.com/Ansh420/heart-attack-prediction.git**\n\n\n## Install Dependencies:\n  \n$ pip install **-r requirements.txt**\n\n\n## Prepare the Data:\n\nPlace your dataset in a CSV file named **heart.csv**.\n\n- Train the Model:\n\n$ python **train.py**\n\n\nThis script will load the dataset, preprocess it, and train a machine learning model.\n\n\n## Model Architecture\nThe specific machine learning algorithm used can be customized by modifying the **train.py** script. Possible options include:\n\n- Logistic Regression\n- Decision Trees\n- Random Forests\n- Support Vector Machines\n\n![1__sp4c5RUZsAY3i5PqAN4pw](https://github.com/user-attachments/assets/9e4fb1bc-820f-4c5e-8b39-9ba2ef702e76)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansh420%2Fheart-attack-prediction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fansh420%2Fheart-attack-prediction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansh420%2Fheart-attack-prediction/lists"}