Segmentation
This module contains classes for segmenting the trial data with different methods.
The module provides classes for segmenting the trial data based on gait events as well as a base class to implement additional methods.
- class gaitalytics.segmentation.GaitEventsSegmentation(event_label: str = 'Foot Strike')
A class for segmenting the trial data based on gait events.
This class provides a method to segment the trial data based on gait events. It splits the trial data based on the event label and context.
- __init__(event_label: str = 'Foot Strike')
Initializes a new instance of the GaitEventsSegmentation class.
- Parameters:
event_label – The label of the event to be used for segmentation.
- segment(trial: Trial) TrialCycles
Segments the trial data based on gait events and contexts.
- Parameters:
trial – The trial to be segmented.
- Returns:
A new trial containing the all the cycles.
- Raises:
ValueError – If the trial does not have events.