2026
MotionCode
Classifies synthetic ECG-like traces into four morphology groups, with recording-level splits to prevent train-test leakage.
- Role
- Sole engineer
- Stack
- Python, NumPy, scikit-learn, GitHub Actions

The problem
Small signal datasets are particularly sensitive to leakage. If traces from the same recording appear in both training and test data, the reported result can overstate how well the model generalizes.
MotionCode classifies synthetic heartbeat-like traces as regular, irregular, wide, or burst. Splits are made by recording and validated for overlap. Each trained model is also compared with a dummy classifier that always predicts the most common class.
How it runs
- A seeded generator creates the waveform dataset for reproducible offline runs.
- Data is split by recording and checked for overlap before training.
- Hand-engineered features are evaluated with logistic regression and random forest models. A small 1-D CNN provides an additional comparison.
- The complete pipeline runs offline in CI.
Results
Macro-F1 on the synthetic test split, compared with a most-frequent-class baseline.
- Dummy
- 0.11
- Logistic regression
- 0.70

Reading the results
Logistic regression reaches 0.70 macro-F1 compared with 0.11 for the dummy baseline. The 1-D CNN also exceeds the dummy but trails the feature-based model on this dataset. The four classes describe synthetic waveform morphology and are not clinical diagnoses.
Limits
- The labels describe synthetic waveform morphology, not clinical diagnoses.
- A PhysioNet download script is included, but the reported results use only synthetic data. MIT-BIH beat labels have not been mapped to the four project classes.
- The test set is small, so small differences between the feature-based models should not be treated as meaningful.