gaitmap.zupt_detection.ComboZuptDetector#

class gaitmap.zupt_detection.ComboZuptDetector(detectors: list[tuple[str, gaitmap.base.BaseZuptDetector]] | None = None, operation: Literal['and', 'or'] = 'or')[source]#

A ZUPT detector that combines multiple ZUPT detectors.

Parameters:
detectors

A list of tuples of the form (name, detector_instance).

operation

The operation to combine the detectors. Must be one of and, or.

Other Parameters:
data

The data passed to the detect method

sampling_rate_hz

The sampling rate of this data

Attributes:
zupts_

Get the start and end values of all zupts.

per_sample_zupts_

A bool array with length len(data). If the value is True for a sample, it is part of a static region.

min_vel_value_

Always None. Only implemented for API compatibility.

min_vel_index_

Always None. Only implemented for API compatibility.

Methods

clone()

Create a new instance of the class with all parameters copied over.

detect(data, *, sampling_rate_hz, **kwargs)

Detect static regions in the data.

from_json(json_str)

Import an gaitmap object from its json representation.

get_params([deep])

Get parameters for this algorithm.

set_params(**params)

Set the parameters of this Algorithm.

to_json()

Export the current object parameters as json.

__init__(detectors: list[tuple[str, gaitmap.base.BaseZuptDetector]] | None = None, operation: Literal['and', 'or'] = 'or') None[source]#
clone() Self[source]#

Create a new instance of the class with all parameters copied over.

This will create a new instance of the class itself and all nested objects

detect(data: DataFrame, *, sampling_rate_hz: float, **kwargs) Self[source]#

Detect static regions in the data.

Parameters:
data

The data to detect static regions in

sampling_rate_hz

The sampling rate of the data

Returns:
self

The class instance with all result attributes populated

classmethod from_json(json_str: str) Self[source]#

Import an gaitmap object from its json representation.

For details have a look at the this example.

You can use the to_json method of a class to export it as a compatible json string.

Parameters:
json_str

json formatted string

get_params(deep: bool = True) dict[str, Any][source]#

Get parameters for this algorithm.

Parameters:
deep

Only relevant if object contains nested algorithm objects. If this is the case and deep is True, the params of these nested objects are included in the output using a prefix like nested_object_name__ (Note the two “_” at the end)

Returns:
params

Parameter names mapped to their values.

set_params(**params: Any) Self[source]#

Set the parameters of this Algorithm.

To set parameters of nested objects use nested_object_name__para_name=.

to_json() str[source]#

Export the current object parameters as json.

For details have a look at the this example.

You can use the from_json method of any gaitmap algorithm to load the object again.

Warning

This will only export the Parameters of the instance, but not any results!

Examples using gaitmap.zupt_detection.ComboZuptDetector#

Advanced Kalman Filter Usage

Advanced Kalman Filter Usage

Advanced Kalman Filter Usage