AI · Deep Learning · Computer Vision · Model Evaluation

Preserving evaluation conditions for AUC and F1 in PPG-HRV classification

2026-07-31 · updated 2026-08-01 · Hyeongrok Ryu

Why subject splits, folds, preprocessing, confusion matrices, and paper-reported metrics are not merged into one performance value.

Series
CNN and Discriminative AI · 3
Type / level
study-note · intermediate
Tools
Python, CNN, HRV
01Questions before comparing values

A checkpoint in the study sequence for this note.

02PPG-to-classification pipeline

A checkpoint in the study sequence for this note.

03Subject splits and folds

A checkpoint in the study sequence for this note.

04AUC, F1, and confusion matrices

A checkpoint in the study sequence for this note.

A compact concept path generated from this post's table of contents.

Questions before comparing values

Matching model and metric names do not make two values comparable. In PPG-HRV classification, the result changes with these decisions:

  • Can segments from one participant enter both train and test sets?
  • Is the split made by sample, recording, session, or subject?
  • Was preprocessing or peak rejection fitted before the folds were formed?
  • Is AUC the mean of fold values or a pooled prediction result?
  • Is F1 binary, macro, or weighted?

Without those conditions, a number such as 0.85 cannot be reproduced or interpreted correctly.

PPG-to-classification pipeline

Pipeline connecting an earlobe PPG sensor, STM32 acquisition, IBI HRV preprocessing, and CNN Transformer evaluation
The processing order runs from sample timing through peaks, IBIs, HRV features, and model evaluation.

An earlobe PPG sensor and analog front-end feed samples to STM32 acquisition. Peak locations produce inter-beat intervals, followed by time- and frequency-domain HRV features and CNN-family classification.

Sample rejection and interpolation must be recorded. Peak-rejection thresholds and IBI correction should be fixed without using test labels; otherwise preprocessing can leak information.

Subject splits and folds

Segments from one participant are correlated. A random segment split can place one person’s patterns in both training and testing. When the target is generalization to unseen people, the split should group by subject.

Each cross-validation fold needs preserved train, validation, and test subject lists plus a seed. Scaling, feature selection, and missing-value processing must be fitted on the training fold and then applied to validation and test data. Dataset-wide normalization before splitting leaks test information into preprocessing parameters.

AUC, F1, and confusion matrices

AUC summarizes the tradeoff between true-positive and false-positive rates across thresholds. With strong class imbalance, ROC-AUC alone may hide poor positive-class precision, so a precision-recall curve is useful.

F1 is the harmonic mean of precision and recall. Threshold, positive label, and averaging method all change it. A confusion matrix exposes TP, FP, FN, and TN counts, making false alarms and misses visible. Sample-level and subject-level summaries should remain separate when subject sample counts differ.

Architecture connecting PPG acquisition, HRV preprocessing, and CNN evaluation
A metric is tied to split, preprocessing, and aggregation conditions rather than presented as an isolated endpoint.

Paper result and code archive

The paper abstract reports average AUC 0.85 and F1-score 0.82. Before comparing a separate five-fold CSV archive, I need to confirm that its dataset scope, folds, and aggregation match the paper. I therefore keep the two sets of values in separate rows instead of averaging them.

Each result bundle should retain its source file, dataset scope, exclusions, split unit, fold count, preprocessing version, model checkpoint, and metric code. Participant raw signals remain private; only group-level aggregates and a reproducible procedure are public.

Unverified items

The saved files were not enough to rerun every fold with the same subject split and preprocessing version. I therefore list the paper-table values and saved code-run values separately. My next step is to rebuild the subject-group split list and fold predictions, then compare the metric calculation.

Sources used

Publication first-page preview