Cardia

Cardia — Cardiovascular Risk Assessment (CDSS)

A machine-learning-based clinical decision-support system that estimates a patient’s cardiovascular risk from routinely measured clinical parameters and presents it in an interpretable, clinician-oriented interface.

Built as a graduation project (Grand Project II), Manisa Celal Bayar University, Department of Computer Engineering.

⚠️ Decision-support prototype — not a diagnostic device. Intended to support, never to replace, clinical judgement.


Overview

Most cardiovascular risk tools stop at either a research notebook or an isolated calculator. Cardia does both halves: it trains and validates a model and ships it inside a working application that manages patients, records assessments and produces printable clinical reports — with no server, no database and no network connection required.

The trained model runs entirely in the browser: its coefficients are embedded directly in the application, so inference is pure arithmetic on the client.


Features


Model performance

Six supervised algorithms were trained and compared on a held-out test set (80/20 stratified split, standardised features).

Model Accuracy Precision Recall F1 ROC-AUC
Gradient Boosting 73.63% 76.00% 68.26% 71.92% 0.8078
Random Forest 73.42% 76.82% 66.27% 71.16% 0.8068
Logistic Regressiondeployed 73.21% 76.23% 66.62% 71.10% 0.7973
SVM 73.10% 76.40% 66.02% 70.83% 0.7931
Decision Tree 72.57% 74.98% 66.86% 70.69% 0.7867
KNN 71.08% 71.94% 68.11% 69.97% 0.7630

5-fold cross-validation (deployed model): ROC-AUC 0.791 ± 0.005

Why Logistic Regression?

The best ensemble beats it by only ~0.01 ROC-AUC — negligible for an individual prediction. In exchange, logistic regression is fully interpretable and compact enough to be embedded directly in the application, so risk is computed locally with no server, database or network call. A deliberate trade of negligible discrimination for interpretability and portability.


Hybrid risk engine

The training dataset contains no comorbidity fields, so they cannot be learned directly. Following the rationale of established calculators such as QRISK3, Cardia keeps the statistical and clinical layers separate and transparent:

  Measured clinical features
            │
            ▼
  1. Base model risk            Logistic Regression → probability (0–1)
            │
            ▼
  2. Clinical adjustment        base odds × evidence-informed multipliers
            │                   (comorbidities, history, diet)
            ▼
  3. Adjusted risk              final probability + Low / Moderate / High band

Both the base risk and the applied multipliers are shown to the user, so the reasoning behind a result is always visible.


Running it

1. Standalone (no installation)

Open app/index.html in any modern browser. That’s it — the whole application is a single self-contained file.

2. Desktop application (Electron)

Requires Node.js (LTS).

cd desktop
npm install
npm start          # run it
npm run dist       # build an installer (dist/)

Reports are exported straight to PDF using Electron’s native print-to-PDF.

On Windows you can also just double-click desktop/Cardia (Masaüstü).bat — it opens the app in a clean, chrome-less window with no installation at all.

3. Mobile app (PWA)

Host the web/ folder on any static host (Netlify Drop, GitHub Pages, …), open the URL on a phone, then:

It installs with its own icon, opens full-screen and works offline after the first load.

Demo accounts

Clinician Password
Dr. Sarah Chen doctor123
Dr. James Okafor doctor123

New accounts can be created from the sign-in screen.


Project structure

├── app/          Standalone single-file web application
├── desktop/      Electron wrapper (main process, preload bridge, build config)
├── web/          Progressive Web App bundle (manifest, service worker, icons)
├── notebook/     Jupyter notebook — data prep, model training and comparison
└── docs/         Project report

Dataset

Cardiovascular Disease dataset (Kaggle) — 70,000 records, reduced to 68,634 after removing physiologically implausible values.

Twelve features: age, sex, height, weight, systolic and diastolic blood pressure, cholesterol, glucose, smoking, alcohol and physical activity, plus two engineered features — BMI and pulse pressure. Classes are roughly balanced (~50/50).

The dataset itself is not redistributed here; download it from the link above and place cardio_train.csv next to the notebook to reproduce the training.


Limitations

Stated openly, since they define the boundary between this prototype and a clinical product:


Tech stack

Modelling: Python · pandas · NumPy · scikit-learn Application: HTML5 · CSS · vanilla JavaScript (no framework) · SVG Packaging: Electron · electron-builder · PWA (manifest + service worker)


Author

Ahmet Burak Güvercin Manisa Celal Bayar University — Department of Computer Engineering Advisor: Dr. Öğr. Üyesi Gamze Türkmen

License

MIT