How spidy52/heart_attack works
This repository is a heart-disease prediction and analysis project with parallel decision-tree and XGBoost workflows, fuzzy-clustering analysis, generated reports, and an XGBoost Flask risk-entry interface. Training scripts read the heart dataset, fit classifiers, evaluate them, and produce prediction outputs and artifacts. The web app accepts patient measurements and uses the saved XGBoost model to return a risk presentation. The graph reflects the sampled scripts; the README is empty, and artifact relationships are included only where shown by source.
Main entry points: heart.csv Heart Dataset · Decisiontree.py Train and Evaluate · Xgboost.py Train and Evaluate · app.py Risk Prediction and Display
Components 15
Dataset
- Heart Dataset
heart.csv
Decision Tree Analysis
- Train and Evaluate
Decisiontree.py - Tree and Fuzzy Reports
decisiontreepng.py - Decision Tree Model
output/decision_tree.pkl - DT Predictions
decision_tree_predictions.csv - DT Report Artifacts
output/full_report.pdf
XGBoost Analysis
- Train and Evaluate
Xgboost.py - Fuzzy and Report Outputs
xgboostpng.py - XGBoost Model
xgboost/xgb_model.pkl - XGBoost Predictions
xgboost_predictions.csv - XGBoost Report
xgboost/full_report.pdf
Risk Web App
- Patient Risk Form
xgboost/app.py - Risk Prediction and Display
xgboost/app.py
Other components
- Patient / User
- Clinician
Connections 14
- Train and Evaluate → Heart Dataset: reads
Decisiontree.py - Tree and Fuzzy Reports → Heart Dataset: reads
decisiontreepng.py - Train and Evaluate → Decision Tree Model: writes
- Train and Evaluate → DT Predictions: writes
Decisiontree.py - Tree and Fuzzy Reports → DT Report Artifacts: writes
decisiontreepng.py - Train and Evaluate → Heart Dataset: reads
Xgboost.py - Fuzzy and Report Outputs → Heart Dataset: reads
xgboostpng.py - Train and Evaluate → XGBoost Model: writes
- Train and Evaluate → XGBoost Predictions: writes
Xgboost.py - Fuzzy and Report Outputs → XGBoost Report: writes
xgboostpng.py - Clinician → Patient Risk Form: enters data
xgboost/app.py - Patient Risk Form → Risk Prediction and Display: submits measurements
xgboost/app.py - Risk Prediction and Display → XGBoost Model: loads and predicts
xgboost/app.py - Risk Prediction and Display → Clinician: displays risk
xgboost/app.py