Views
No views yet
| Metric | Value |
|---|---|
| AUROC | 0.932 [0.895 - 0.972] |
| AUPRC | 0.892 [0.828 - 0.949] |
| Optimal Risk Threshold | 0.302 |
| Sensitivity @ Optimal | 0.855 |
| Specificity @ Optimal | 0.844 |
| Brier Score | 0.0904 |
| Parameter Name | Dimension | Frequency | Description / Layout |
|---|---|---|---|
| ecgShape | (24050,) | 130 HzRaw | continuous 1D ECG trace array |
| ppgShape | (9250,) | 50 Hz | Continuous photoplethysmogram wave |
| accelerometer | (9620, 3) | 52 Hz | 3-axis continuous accelerometer matrix |
| gyroscope | (9620, 3) | 52 Hz | 3-axis continuous gyroscope telemetry |
| respiration | (4625,) | 25 Hz | Continuous chest expansion respiration belt wave |
| spo2Shape (1850,) | 10 Hz | Continuous blood oxygen saturation array stream | |
| temperature | (185,) | 1 Hz | Continuous core body temperature array log |
1pip install git+https://github.com/sharktide/CVD-Predict.git@v1.0.0
2pip install "transformers>=5"
3# Install tensorflow for your system by following the instructions at https://tensorflow.org/install1import numpy as np
2import warnings
3warnings.filterwarnings("ignore")
4
5from transformers import AutoModel
6from ohca_predictor.utils.io_utils import WindowSample
7# 1. Download and map the custom model wrapper from the cloud Hub repository
8model = AutoModel.from_pretrained("sharktide/ohca-predictor-v1", trust_remote_code=True)1patient_record = WindowSample(
2 ecg=np.random.randn(24050).astype(np.float32),
3 accelerometer=np.zeros((9620, 3), dtype=np.float32),
4 gyroscope=np.zeros((9620, 3), dtype=np.float32),
5 ppg=np.random.randn(9250).astype(np.float32),
6 respiration=np.zeros(4625, dtype=np.float32),
7 spo2=np.zeros(1850, dtype=np.float32),
8 temperature=np.zeros(185, dtype=np.float32),
9 demographics=np.zeros(24, dtype=np.float32),
10 medications=np.zeros(14, dtype=np.float32),
11 comorbidities=np.zeros(14, dtype=np.float32),
12 lab_values=np.zeros(8, dtype=np.float32),
13 heart_rate=72.0, rhythm=0, activity_state=0,
14 spo2_mean=97.5, sbp_mean=120.0, dbp_mean=80.0,
15 patient_id="live-monitor-case-001", signal_quality={"ecg": 1.0},
16 window_start_hours=0.0, window_duration_hours=0.05138,
17 ohca_label=0.0, event_indicator=0.0, time_to_event=0.0
18)
19
20# 3. Dispatches forward pass execution natively
21prediction = model(patient_record)
22
23print(f"Prediction Success!")
24print(f"Calculated Patient OHCA Risk: {prediction['ohca_risk'].numpy().item():.4f}")