{"id":22774275,"url":"https://github.com/jbangtson/heart_attack_classification","last_synced_at":"2026-05-09T14:37:44.802Z","repository":{"id":267232672,"uuid":"900567905","full_name":"JBangtson/heart_attack_classification","owner":"JBangtson","description":"This analysis utilizes Logistic Regression to predict heart attacks 🩺❤ and examine significant factors related to heart health. The model is able to predict heart attacks with an overall accuracy of 85%, trained on around 240 heart attack cases.","archived":false,"fork":false,"pushed_at":"2024-12-09T23:13:53.000Z","size":477,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T14:42:43.936Z","etag":null,"topics":["classification","logistic-regression","pandas","python","sklearn"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/JBangtson.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":"2024-12-09T03:56:42.000Z","updated_at":"2024-12-11T01:20:51.000Z","dependencies_parsed_at":"2024-12-09T07:38:30.413Z","dependency_job_id":null,"html_url":"https://github.com/JBangtson/heart_attack_classification","commit_stats":null,"previous_names":["jbangtson/heart_attack_classification"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBangtson%2Fheart_attack_classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBangtson%2Fheart_attack_classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBangtson%2Fheart_attack_classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBangtson%2Fheart_attack_classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JBangtson","download_url":"https://codeload.github.com/JBangtson/heart_attack_classification/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246320192,"owners_count":20758410,"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","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":["classification","logistic-regression","pandas","python","sklearn"],"created_at":"2024-12-11T18:13:32.847Z","updated_at":"2026-05-09T14:37:44.768Z","avatar_url":"https://github.com/JBangtson.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Heart Attack Classification and Analysis    \n\nThis analysis utilizes Logistic Regression to predict heart attacks 🩺❤ and examine significant factors related to heart health. The model is able to predict heart attacks with an overall accuracy of 85%, trained on around 240 heart attack cases.\n\nKey Metrics Summary:\n- Overall Accuracy: 85%\n- Precision (Heart Disease): 0.871\n- Recall (Heart Disease): 0.844\n- F1-Score (Heart Disease): 0.857 (1.0 is max and 100% accuracy, 0 is min)\n\n![Confusion Matrix](assets/confusion_matrix_heatmap.png) \n\n## Chest pain, number of major vessels, and Sex: Highest impact on Heart Attacks.\n![alt text](assets/feature_importance.png) \n\n## Receiver Operating Characteristic (ROC) curve\n\n- AUC-ROC score quantifies the overall ability of the model to distinguish between classes:\n  - AUC = 1.0: Perfect classifier. This model has an absolute difference of 0.07.\n  - AUC = 0.5: No discrimination (random guessing).\n  - AUC \u003c 0.5: Worse than random guessing (the model is likely reversed in its predictions).\n\n- True Positive Rate (TPR): Also known as sensitivity or recall, it measures the proportion of actual positives correctly predicted by the model.\n  - TPR = True Positives (TP) / (True Positives (TP) + False Negatives (FN))\n\n- False Positive Rate (FPR): It measures the proportion of actual negatives incorrectly predicted as positive.\n  - FPR = False Positives (FP) / (False Positives (FP) + True Negatives (TN))\n\n- The ROC curve plots TPR on the y-axis against FPR on the x-axis at various threshold values of the classification model.\n\n![alt text](assets/ROC.png)\n\n\n---\n\nThis data is synthetic and should not be used for medical research; the purpose of this project is to study classification using logistic regression.\n\nSource: https://www.kaggle.com/datasets/rashikrahmanpritom/heart-attack-analysis-prediction-dataset/data\n\n---\n\n[More about the data](assets/heart_profile.html)\n\n---\n\n- **Age**: Age of the patient\n- **Sex**: Sex of the patient\n- **exang**: Exercise induced angina (1 = yes; 0 = no)\n- **ca**: Number of major vessels (0-3)\n- **cp**: Chest Pain type\n    - Value 1: Typical angina\n    - Value 2: Atypical angina\n    - Value 3: Non-anginal pain\n    - Value 4: Asymptomatic\n- **trtbps**: Resting blood pressure (in mm Hg)\n- **chol**: Cholesterol in mg/dl fetched via BMI sensor\n- **fbs**: Fasting blood sugar \u003e 120 mg/dl (1 = true; 0 = false)\n- **rest_ecg**: Resting electrocardiographic results\n    - Value 0: Normal\n    - Value 1: Having ST-T wave abnormality (T wave inversions and/or ST elevation or depression of \u003e 0.05 mV)\n    - Value 2: Showing probable or definite left ventricular hypertrophy by Estes' criteria\n- **thalach**: Maximum heart rate achieved\n- **target**: 0 = less chance of heart attack; 1 = more chance of heart attack\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbangtson%2Fheart_attack_classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjbangtson%2Fheart_attack_classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbangtson%2Fheart_attack_classification/lists"}