GaitPy¶
Gait feature extraction and bout classification from single accelerometer in the lumbar location. This class includes functions for:
Continuous wavelet based method of gait kinematic feature extraction.
Machine learning based method of bout classification.
Visualizing results.
- Parameters:
- data: str or pandas.core.frame.DataFrame
Option 1: Pandas dataframe containing unix timestamp column and vertical acceleration data during gait, both of type float
Option 2: File path of .csv file containing timestamp column and vertical acceleration data during gait. One column should contain unix timestamps of type float (by default gaitpy will assume the column title is ‘timestamps’ with units in milliseconds). A second column should be vertical acceleration of type float (by default gaitpy will assume the column title is ‘y’ with units in m/s^2).
- sample_rate: int or float
Sampling rate of accelerometer data in Hertz.
- v_acc_col_name: str
Column name of the vertical acceleration data (‘y’ by default)
- ts_col_name: str
Column name of the timestamps (‘timestamps’ by default)
- v_acc_units: str
Units of vertical acceleration data (‘m/s^2’ by default). Options:
‘m/s^2’ = meters per second squared
‘g’ = standard gravity
- ts_units: str
Units of timestamps (‘ms’ by default). Options:
‘s’ = seconds
‘ms’ = milli-seconds
‘us’ = microseconds
- flip: bool
Boolean specifying whether to flip vertical acceleration data before analysis (False by default). Algorithm assumes that baseline vertical acceleration data is at -9.8 m/s^2 or -1g. (ie. If baseline data in vertical direction is 1g, set ‘flip’ argument to True)