Index
Tasks API
heartKIT provides several built-in heart-monitoring tasks. Each task is designed to address a unique aspect such as ECG denoising, segmentation, and rhythm/beat classification. The tasks are designed to be modular and can be used independently or in combination to address specific use cases.
Available Tasks
- BeatTask: Beat classification task
- DenoiseTask: Denoising task
- FoundationTask: Foundation task
- RhythmTask: Rhythm classification task
- SegmentationTask: Segmentation task
Task Factory
The TaskFactory provides a convenient way to access the built-in tasks. The factory is a thread-safe singleton class that provides a single point of access to the tasks via the tasks' slug names. The benefit of using the factory is it allows registering custom tasks that can then be used just like built-in tasks.
import heartkit as hk
for task in hk.TaskFactory.list():
print(f"Task name: {task} - {hk.TaskFactory.get(task)}")
Classes:
-
HKTask–Base class for all tasks
-
BeatTask–Beat classification task
-
HKBeat–Beat task class labels
-
DenoiseTask–Denoising task
-
DiagnosticTask–Diagnostic task
-
HKDiagnostic–Diagnostic task class labels
-
FoundationTask–Foundation task
-
HKRhythm–Rhythm task class labels
-
RhythmTask–Rhythm classification task
-
HKSegment–Segmentation task class labels
-
SegmentationTask–Segmentation task