Releases: bunyaminergen/Heartbeat
v0.1.3 Normalization
v0.1.3 Normalization
Description:
- Added local peak normalization to scale each ECG segment to [-1, +1].
- Introduced global z-score normalization for a standardized amplitude distribution across segments.
- Strengthened input consistency and numerical stability, reducing amplitude drift.
- Notable improvement in model performance, especially for atrial fibrillation (AF) detection.
Highlights:
- AUC for AF detection increased from 0.731 to 0.7698, demonstrating enhanced classification performance for AF.
- Other AUC scores:
-
Normal: 0.7008
-
Other: 0.5133
-
Noisy: 0.8610
-
Overall macro AUC: 0.7112
-
- Suitable for projects requiring consistent training data and cross-subject comparability.
v0.1.1 Overlapping Segmentation
v0.1.1 – Overlapping Segmentation
Release Highlights
-
Overlap-Based Segmentation
Introduced a new overlapping segmentation feature to improve data representation. Allows segmenting ECG (or other time series) signals into fixed-length windows with configurable overlap (window
andstep
), directly fetched fromconfig.data.segment.overlap
. -
Data Augmentation Effect
Overlapping segments not only capture temporal transitions more smoothly but also act like a form of data augmentation. This can lead to improved AUC/ROC metrics, while accuracy remains stable. -
Refactored Code
- Created a base
Segment
class for single-signal splitting. - Added an
OverlapSegment
class to handle multiple signals and associated labels, reading overlap parameters from the configuration file. - Addressed minor shape consistency issues and streamlined the data pipeline.
- Created a base
How to Use
- Update your
config.yaml
to specifywindow
andstep
underdata.segment.overlap
. - Instantiate
OverlapSegment(window=..., step=..., pad=True)
in your code. - Call
segment_signals_with_labels(...)
to generate overlapping windows and labels. - Proceed with the usual training workflow using the newly segmented data.
Impact
-
Better Probability Ranking (AUC)
Overlap segmentation often leads to more refined model outputs regarding probability distribution, improving AUC/ROC performance. -
Minimal Impact on Accuracy
In many cases, accuracy stays similar, indicating that while the raw hit-rate is unchanged, the model’s discrimination capability is enhanced.
We hope you find these overlapping segmentation enhancements beneficial! If you encounter any issues or have suggestions, feel free to open an issue or pull request.
Changelog
- Added
OverlapSegment
class for multi-signal segmentation. - Introduced config-driven
window
andstep
parameters. - Improved training logs and AUC measurement.
v0.1.0 Initial
v1.0.0 – Initial Version
Overview
This is the initial release of Heartbeat, a research project designed to classify heartbeats using ECG (electrocardiogram) data. The main goal is to experiment with both traditional and state-of-the-art deep learning models. Future iterations will focus on adding new features, tuning existing models, and refining the project’s modularity.
Key Features
-
Model Architectures
OneDCNN
AdvancedOneDCNN
OneDSelfONN
AdvancedOneDSelfONN
-
Initial Benchmark & Results
- Accuracy, Precision, Recall, and F1 scores for each model are provided in the Report section.
-
Dataset Integration
- Utilizes Physionet’s 2017 Challenge dataset.
- AWS CLI commands to quickly sync and download required data.
Reports
- Confusion Matrices
- Visuals for Training, Validation, and Test sets.
- Benchmark
- Comparative table of model metrics
- Visual benchmark chart
Installation
A comprehensive guide for setting up on Linux/Ubuntu is provided, including:
- Conda environment setup (
environment.yaml
) - Dataset download commands via AWS CLI
File Structure
A detailed hierarchical breakdown of the repository is included, showcasing:
- Configuration files
- Data folders (binary, raw)
- Documentation and report assets
- Scripts and utility modules
Contribution
We welcome contributions!
- Please review our CONTRIBUTING guidelines before submitting a pull request.
Thank you for checking out this initial release of Heartbeat!
Stay tuned for updates as we continue to expand the model suite and refine performance.