torch_ecg.utils.QRS_score¶
- torch_ecg.utils.QRS_score(rpeaks_truths: Sequence[ndarray | Sequence[int]], rpeaks_preds: Sequence[ndarray | Sequence[int]], fs: Real, thr: float = 0.075) float [source]¶
QRS accuracy score, proposed in CPSC2019.
- Parameters:
rpeaks_truths (array_like) – array of ground truths of rpeaks locations (indices) from multiple records.
rpeaks_preds (array_like) – predictions of ground truths of rpeaks locations (indices) for multiple records.
fs (numbers.Real) – Sampling frequency of ECG signal
thr (float, default 0.075) – Threshold for a prediction to be truth positive, with units in seconds.
- Returns:
rec_acc – Accuracy of predictions.
- Return type: