Gaitmap

Latest version: v2.5.2

Safety actively analyzes 723177 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 6

2.2.2

Fixed

- Fixed bug in HMM when uneven sequnece length were provided. In newer numpy versions this requires an explicit cast to
an object array.

2.2.1

Fixed

- Fixed edecase where the output of the stride event method had the events in the wrong order for some strides.
The reason for that is that a valid segmented stridelist does not always result in a valid min_vel_event list for
algorithms that are allowed to search outside the segmented stride region (e.g. `HerzerEventDetection`).
We now check for consistency again after the stride list conversion.

2.2.0

Gaitmap is now available as official PyPi package!!!

Added
- New Algorithm: `MadgwickRtsKalman`.
This is a slightly modified implementation of the `RtsKalman` algorithm.
Instead of naive gyro integration it uses the `Madgwick` algorithm to estimate the orientation.
(https://github.com/mad-lab-fau/gaitmap/pull/15)
- Certain ZUPT detectors now return the `min_vel_index_` and `min_vel_value_` as additional attributes.
These values represent the index in the input data with the lowest velocity and the corresponding velocity value
(according to the internal metric of the repective ZUPT detector).
(https://github.com/mad-lab-fau/gaitmap/pull/16)
- New example explaining more advanced usage of the `RtsKalman` algorithm.
(https://github.com/mad-lab-fau/gaitmap/pull/17)
- The `find_extrema_in_radius` and the `snap_to_min` utility functions gained the ability to define asymetric search
windows around the search indices.
(https://github.com/mad-lab-fau/gaitmap/pull/21)
- Temporal and Spatial Parameter calculation have new options to work with ic-stride lists and with partial input
information
- A new method `calculate_parameter_errors` (old version is renamed to `calculate_aggregated_parameter_errors`) is
added that allows to calculate just the errors (i.e. relative error, absolute error, etc.) for a given list of
parameters. If you want to have the aggregated parameter errors (i.e. mean absolute error, mean relative error, etc.)
use the `calculate_aggregated_parameter_errors` method.

Changed

- We now require Pandas >2.0 as we are using the new pandas dtypes.
It could be that this will require you to perform some sxplicit type conversion in your code.
- The Zupt Detector example is updated to use newer tpcp features
(https://github.com/mad-lab-fau/gaitmap/pull/17)
- The column order of the Spatial Parameter Calculation output has been changed
- The function `calculate_parameter_errors` is renamed to `calculate_aggregated_parameter_errors` function is now more
general and can be used with parameter lists that don't represent strides.
For this the unique-id column (i.e. original stride index) is can be explicitly set and all wording is changed to
be more general.
(https://github.com/mad-lab-fau/gaitmap/pull/24)
- Fixed a bug that the calculation of the ICC in `calculate_parameter_errors`/`calculate_aggregated_parameter_errors`
was not working correctly, when the stride ids where duplicated across sensors.

2.1.0

Added
- **HIGHLIGHT**: Finally reworked the HMM branch, added tests and documentation and adapted the API to fit the rest of
the gaitmap and tpcp ecosystem better.
(https://github.com/mad-lab-fau/gaitmap/pull/3).
On the way, there were also some bugs fixed and internal computations were optimized.
If you were using the HMM branch before, read through the HMM examples again before updating!
All the classes and methods have new names and import paths.
Further, you will likely not get exactly the same results.
However, when using the pretrained model, changes should be minimal.
If you were training your own model, it might be that you get different results, as you might have been effected by
a bug in the training code when using "labeled" training with the composite model
(for details: https://github.com/mad-lab-fau/gaitmap/issues/4).
This is fixed now! So please retrain your models.
- A new version of the `RamppEventDetection` is added. `FilteredRamppEventDetection` adds a lowpass filter before the
detection of the IC to remove potential high-freq artifacts.
- New higher level transformers that allow for complex combinations and chaining of transformers.
Most of them make use of the new `tpcp` composite Algorithm feature that allows to easily get and set complicated
nested parameters.
New transformers include: `ChainedTransformer`, `ParallelTransformer`
(https://github.com/mad-lab-fau/gaitmap/pull/2)
- New implementation of a Filter class and a `ButterworthFilter` implementation on top of the transformer API.
(https://github.com/mad-lab-fau/gaitmap/pull/2)
- Added a new `flip_dataset` function that can be used instead of `rotate_dataset`, when you only need to perform 90/180
degree rotations.
It is much faster than `rotate_dataset`, as it just flips the axis labels and multiplies values by -1.
(https://github.com/mad-lab-fau/gaitmap/pull/10)
- New Zupt detecor methods: `AredZuptDetectors` and `ShoeZuptDetectors`.
The ARED detector is a special case of the existing `NormZuptDetector` (using specifically the mean of the gyr norm)
and the SHOE detector uses a combination of acc and gyr data.
(https://github.com/mad-lab-fau/gaitmap/pull/11)
- All Zupt detectors have a new parameter `window_overlap_samples` that can be used as alternative to `window_overlap`
to specify the window overlap in samples independent of the sampling rate.
(https://github.com/mad-lab-fau/gaitmap/pull/11)
- Added new example to show how the Zupt Detector can be tuned to improve the performance of the trajectory estimation
kalman filter.
(https://github.com/mad-lab-fau/gaitmap/pull/11)
- It is now possible to only detect a subset of the supported events of an event detection method using the
`detect_only` parameter.
(https://github.com/mad-lab-fau/gaitmap/pull/12)
- The function `calculate_parameter_errors` now also outputs the number of strides used for matching per parameter.
(https://github.com/mad-lab-fau/gaitmap/pull/13)
- The function `calculate_parameter_errors` returns way more parameters.
All basic statistics are now calculated for the error, relative error, absolute error and the relative absolute error.
If `pingouin` is installed, we also calculte the ICC.
(https://github.com/mad-lab-fau/gaitmap/pull/13)
- A new utility method to intersect stride lists by a region of interest list.
(https://github.com/mad-lab-fau/gaitmap/pull/14)
- A new ZuptDetector method `StrideEventZuptDetector` that simply returns the min_vel events of an already provided
event list as ZUPTs.
This is enabled by the new `stride_event_list` parameter of the `detect` method of all ZuptDetector methods (see
Changes)
(https://github.com/mad-lab-fau/gaitmap/pull/14)
- A new ZuptDetector method `ComboZuptDetector` that allows to combine the output of multiple ZuptDetector methods using
either logical "or" or "and".
(https://github.com/mad-lab-fau/gaitmap/pull/14)
- The `PerSampleZuptDetectorMixin` and `RegionZuptDetectorMixin` are now public API to simplify the implementation of
custom ZUPT detectors.
(https://github.com/mad-lab-fau/gaitmap/pull/14)


Changed
- When using `memory` with any of Dtw methods, we will not cache the peak detection step anymore.
It does not really speed up things and just leads to dozents of cache writes/reads as the chance of a cache match is
really low.
- The `zupts_` result of `RtsKalmanFilter` is not a pandas dataframe with `start` and `end` columns instead of a
np.ndarray.
The content remains the same.
- The `sampling_rate_hz` parameter of the `detect` method of the `EventDetection` algorithms is now keyword only.
(https://github.com/mad-lab-fau/gaitmap/pull/12)
- For the function `calculate_parameter_errors` the naming of ground truth was changed to reference and input to
predicted.
This change requires updating the function call in your code.
(https://github.com/mad-lab-fau/gaitmap/pull/13)
- For all trajectory/pos/ori methods, the `sampling_rate_hz` parameter is now keyword only.
This might require some user facing code changes.
(https://github.com/mad-lab-fau/gaitmap/pull/14)
- Trajectory/pos/ori and ZUPT methods can now get an optional parameter called `stride_event_list` as parameter for the detect
method.
So far, only the RTS Kalman Filter is using this parameter to forward it to the ZUPT method.
Both wrapper (Stride-level and Region) are both aware of this parameter and pass them correctly down to the respective
methods.
(https://github.com/mad-lab-fau/gaitmap/pull/14)
- The util method `start_end_array_to_bool_array` now assumes that the end index of all regions is inclusive.
This enables roundtrip conversion with the `bool_array_to_start_end_array` method and is in line with the definitions
used for strides, ROIs, and ZUPTs in gaitmap.
Further, the method now supports to output arrays that are shorter than the largest input index.
Before, this resulted in an error.
Both changes might require some user facing code changes, if this function is used.
However, as it was not used internally, it is likely that no one was using it anyway.
(https://github.com/mad-lab-fau/gaitmap/pull/14)


Removed
- The `find_zupts` method of the `RtsKalmanFilter` and all deprecated arguments are now fully removed in favor of the
dedicated ZUPT algorithms.
The parameters where deprecated since version 1.5

Migration Guide

- There are a bunch of small changes that are not backwards compatible.
The most important is likely the change to make the `sampling_rate_hz` parameter (and other) keyword only in many
methods.
This means, you need to use the parameter name when calling these methods.
For example, if you used `detect(data, 100)` before, you now need to use `detect(data, sampling_rate_hz=100)`.

2.0.2

Fixed issues with namedtuple inheritance in Python 3.9.

2.0.1

Fixed some dependencies and internal links that where broken after the move to Github.

Page 2 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.