How ravibabu226/ml-major_project works
CardioPulse AI is a Django clinical heart-disease risk assessment platform backed by trained hybrid and stacking classifiers. The main workflow is clinician sign-in, entry and validation of 13 patient features, inference, and optionally saving and viewing the assessment. The application also provides prediction history, dashboard summaries, model insights/performance, and authenticated REST endpoints. Training and evaluation form an offline model lifecycle. The graph follows the README and sampled code; unsampled view and URL wiring is represented only where documented or directly supported by the excerpts.
Main entry points: predictions/views.py Prediction views and API · train.py Training and evaluation · accounts/views.py Account views · urls.py Django routing
Components 20
Web and identity
- Django routing
config/urls.py - Account views
accounts/views.py - Account forms
accounts/forms.py - Django user store
accounts/models.py - Web pages
templates
Clinical assessment
- Prediction views and API
predictions/views.py - Assessment form
predictions/forms.py - Feature validation
ml/preprocessing.py - Ensemble inference
ml/predict.py - API serializers
predictions/serializers.py
ML lifecycle
- Trained pipeline
ml/trained_models/trained_pipeline.joblib - Training and evaluation
ml/train.py - Clinical dataset
ml/data/heart.csv - Training preprocessing
ml/preprocessing.py - Model metrics and insights
ml/evaluate.py
Records and insights
- Prediction services
predictions/services.py - Prediction records
predictions/models.py - SQLite database
config/settings.py
Other components
- Clinician
- Web browser / API client
Connections 24
- Clinician → Web browser / API client: uses
- Web browser / API client → Django routing: sends requests
- Django routing → Account views: dispatches accounts
- Django routing → Prediction views and API: dispatches app
- Account views → Account forms: validates input
- Account views → Django user store: authenticates users
- Account views → Web pages: renders auth pages
- Prediction views and API → Assessment form: binds assessment
- Assessment form → Feature validation: validates features
- Prediction views and API → Ensemble inference: requests prediction
- Ensemble inference → Trained pipeline: loads models
- Prediction views and API → Prediction services: saves and aggregates
- Prediction services → Prediction records: creates and queries
- Prediction views and API → Prediction records: queries history
- Prediction records → SQLite database: persists records
- Django user store → SQLite database: persists accounts
- Prediction views and API → API serializers: serializes API data
- Prediction views and API → Web pages: renders results and dashboards
- Prediction views and API → Model metrics and insights: reads model metrics
- Prediction services → Model metrics and insights: syncs evaluated metrics
- Training and evaluation → Clinical dataset: loads training data
- Training and evaluation → Training preprocessing: fits transformations
- Training and evaluation → Trained pipeline: serializes fitted models
- Training and evaluation → Model metrics and insights: writes evaluation artifacts