How dharshiniramdj/heart-analyzer works
Heart Analyzer is a local Streamlit screening app: users enter clinical measurements, submit them for an SVM prediction, and receive a risk message, health score, likely contributing factor, and follow-up guidance. The main source combines data preparation, model training, the interface, and inference. The README describes heart.csv as the training dataset, but the shown code reads from a hard-coded machine-specific path, so the graph does not assert that the repository CSV is actually loaded. All implementation nodes therefore point to the single sampled source file.
Main entry points: heart_analyzer.py Risk prediction
Components 13
Model preparation
- Clinical data file
- Load and prepare data
heart_analyzer.py - Feature scaler
heart_analyzer.py - SVM classifier
heart_analyzer.py
User interaction
- Medical guidance sidebar
heart_analyzer.py - Health parameter inputs
heart_analyzer.py - Input encoding
heart_analyzer.py
Risk results
- Risk prediction
heart_analyzer.py - Risk status message
heart_analyzer.py - Health score
heart_analyzer.py - Likely risk factors
heart_analyzer.py - Follow-up guidance
heart_analyzer.py
Other components
- Health app user
Connections 15
- Health app user → Health parameter inputs: enters values
heart_analyzer.py - Health app user → Medical guidance sidebar: views guidance
heart_analyzer.py - Clinical data file → Load and prepare data: loads data
heart_analyzer.py - Load and prepare data → Feature scaler: fits on features
heart_analyzer.py - Feature scaler → SVM classifier: transforms training data
heart_analyzer.py - Load and prepare data → SVM classifier: trains model
heart_analyzer.py - Health parameter inputs → Input encoding: provides selections
heart_analyzer.py - Input encoding → Feature scaler: transforms input
heart_analyzer.py - Input encoding → Risk prediction: submits on click
heart_analyzer.py - Risk prediction → SVM classifier: calls predict
heart_analyzer.py - Risk prediction → SVM classifier: calls predict_proba
heart_analyzer.py - Risk prediction → Risk status message: displays result
heart_analyzer.py - Risk prediction → Health score: computes score
heart_analyzer.py - Risk prediction → Likely risk factors: ranks factors
heart_analyzer.py - Risk prediction → Follow-up guidance: shows guidance
heart_analyzer.py