gaitmap.data_transform: Scaler and Feature Transforms for IMU data#

Classes representing data transformations as preprocessing for different algorithms.

Base classes#

BaseTransformer()

Base class for all data transformers.

BaseFilter()

Base class for all filters.

TrainableTransformerMixin()

Mixin for transformers with adaptable parameters.

Higher-level Transformers#

GroupedTransformer(transformer_mapping[, ...])

Apply specific transformations to specific groups of columns.

ChainedTransformer(chain)

Apply a series of transformations to the input.

ParallelTransformer(transformers)

Apply multiple different transformation to the input, resulting in multiple outputs.

Simple Transformers and Scalers#

IdentityTransformer()

Dummy Transformer that does not modify the data and simply returns a copy of the input.

FixedScaler([scale, offset])

Apply a fixed scaling and offset to the data.

StandardScaler([ddof])

Apply a standard scaling to the data.

TrainableStandardScaler([mean, std, ddof])

Apply a standard scaling to the data.

AbsMaxScaler([out_max])

Scale data by its absolute maximum.

TrainableAbsMaxScaler([out_max, data_max])

Scale data by the absolut max of a trainings sequence.

MinMaxScaler([out_range])

Scale the data by its Min-Max values.

TrainableMinMaxScaler([out_range, data_range])

Scale the data by Min-Max values learned from trainings data.

Feature Transformers#

Resample([target_sampling_rate_hz])

Resample a time series using the scipy resample method.

BaseSlidingWindowFeatureTransform([...])

Baseclass for all Sliding window feature transforms.

SlidingWindowMean([window_size_s])

Calculate a sliding window mean.

SlidingWindowVar([window_size_s])

Calculate a sliding window variance.

SlidingWindowStd([window_size_s])

Calculate a sliding window standard deviation.

SlidingWindowGradient([window_size_s])

Calculate a sliding gradient by fitting a linear function on every sliding window.

Filter#

ButterworthFilter(order, cutoff_freq_hz[, ...])

Apply a forward-backward (filtfilt) butterworth filter using the transformer interface.