gaitmap.base.BaseAlgorithm#

class gaitmap.base.BaseAlgorithm[source]#

Base class for all algorithms.

All type-specific algorithm classes should inherit from this class and need to

  1. overwrite _action_method with the name of the actual action method of this class type

  2. implement a stub for the action method

Attributes:
_action_method

The name of the action method used by the Childclass

Methods

clone()

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

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__(*args, **kwargs)#
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

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.base.BaseAlgorithm#

MaD DiGait Pipeline

MaD DiGait Pipeline

MaD DiGait Pipeline
Automatic sensor alignment

Automatic sensor alignment

Automatic sensor alignment
Automatic sensor alignment (detailed)

Automatic sensor alignment (detailed)

Automatic sensor alignment (detailed)
Ullrich gait sequence detection

Ullrich gait sequence detection

Ullrich gait sequence detection
BarthDtw stride segmentation

BarthDtw stride segmentation

BarthDtw stride segmentation
Constrained BarthDtw stride segmentation

Constrained BarthDtw stride segmentation

Constrained BarthDtw stride segmentation
Stride segmentation with Regions of Interest

Stride segmentation with Regions of Interest

Stride segmentation with Regions of Interest
HMM stride segmentation - Prediction with pre-trained model

HMM stride segmentation - Prediction with pre-trained model

HMM stride segmentation - Prediction with pre-trained model
SegmentationModel Training

SegmentationModel Training

SegmentationModel Training
BarthDtw stride segmentation with Custom Template

BarthDtw stride segmentation with Custom Template

BarthDtw stride segmentation with Custom Template
Herzer event detection

Herzer event detection

Herzer event detection
Rampp event detection

Rampp event detection

Rampp event detection
Stride Level Trajectory reconstruction

Stride Level Trajectory reconstruction

Stride Level Trajectory reconstruction
Region Level Trajectory reconstruction

Region Level Trajectory reconstruction

Region Level Trajectory reconstruction
ZUPT Dependency of the Trajectory Estimation

ZUPT Dependency of the Trajectory Estimation

ZUPT Dependency of the Trajectory Estimation
Advanced Kalman Filter Usage

Advanced Kalman Filter Usage

Advanced Kalman Filter Usage
Temporal parameters calculation

Temporal parameters calculation

Temporal parameters calculation
Spatial parameters calculation

Spatial parameters calculation

Spatial parameters calculation
Grid Search optimal Algorithm Parameter

Grid Search optimal Algorithm Parameter

Grid Search optimal Algorithm Parameter
Optimizable Pipelines

Optimizable Pipelines

Optimizable Pipelines
Cross Validation

Cross Validation

Cross Validation
GridSearchCV

GridSearchCV

GridSearchCV
Running multiple pipelines in parallel

Running multiple pipelines in parallel

Running multiple pipelines in parallel
Export Algorithms to JSON

Export Algorithms to JSON

Export Algorithms to JSON
Caching algorithm outputs

Caching algorithm outputs

Caching algorithm outputs
BaseDtw simple segmentation

BaseDtw simple segmentation

BaseDtw simple segmentation