EgaitParameterValidation2013 - Stride Length#

Algorithms#

Hide code cell source
from myst_nb_bokeh import glue_bokeh

from gaitmap_bench import config, is_config_set
from gaitmap_bench.docu_utils import set_docs_config
from gaitmap_challenges.spatial_parameters.egait_parameter_validation_2013 import Challenge
from gaitmap_challenges.results import load_run, get_latest_result, filter_results, get_all_result_paths, \
    generate_overview_table
from gaitmap_challenges.visualization import SingleMetricBoxplot, group_by_data_label

is_config_set() or set_docs_config()
all_runs = get_all_result_paths(Challenge, config().results_dir)
all_runs = filter_results(all_runs, challenge_version=Challenge.VERSION, is_debug_run=False)
latest_runs = get_latest_result(all_runs)
generate_overview_table(latest_runs).set_index("Entry").T
Entry (gaitmap, madgwick_rts_kalman, default) (gaitmap, madgwick_rts_kalman, optimized) (gaitmap, rts_kalman, default) (gaitmap, simple_integration, default) (gaitmap, simple_integration_madgwick, default)
Datetime 2023-07-28T12:28:19.206081+02:00 2023-07-28T12:28:21.676886+02:00 2023-07-28T12:28:21.300444+02:00 2023-07-28T12:28:19.205225+02:00 2023-07-28T12:28:21.279519+02:00
Description Kalman filter with RTS smoothing Kalman filter with RTS smoothing using the Mad... Kalman filter with RTS smoothing Stride level double-integration with dedrifting Stride level double-integration with dedriftin...
References [https://ieeexplore.ieee.org/document/6418869,... [https://ieeexplore.ieee.org/document/6418869,... [https://ieeexplore.ieee.org/document/6418869,... [http://www.mdpi.com/1424-8220/17/9/1940, http... [http://ieeexplore.ieee.org/document/5975346/,...
Code Authors [MaD-DiGait] [MaD-DiGait] [MaD-DiGait] [MaD-DiGait] [MaD-DiGait]
Algorithm Authors [See references] [Arne Küderle (Integration of Madgwick), See r... [See references] [See references] [See references]
Implementation https://github.com/mad-lab-fau/gaitmap https://github.com/mad-lab-fau/gaitmap https://github.com/mad-lab-fau/gaitmap https://github.com/mad-lab-fau/gaitmap https://github.com/mad-lab-fau/gaitmap

Stride Length Error#

Hide code cell source
from gaitmap_bench.docu_utils import glue_bokeh_md, tabs
from myst_nb import glue
from IPython.display import Markdown

run_info = {k: load_run(Challenge, v) for k, v in latest_runs.items()}
cv_results = {k: v.results["cv_results"]  for k, v in run_info.items()}

tab_items = {}
metrics = {
    "Mean Absolute Error": "abs_error_mean",
    "Mean Absolute Relative Error": "abs_rel_error_mean",
    "Mean Error": "error_mean",
    "Mean Relative Error": "rel_error_mean",
}

for name, metric in metrics.items():
    p = SingleMetricBoxplot(cv_results, metric, "single", overlay_scatter=True)
    glue_name = f"single_{metric}"
    glue_bokeh(glue_name, p.bokeh())
    tab_items[name] = glue_bokeh_md(glue_name)

glue("single_results", Markdown(tabs(tab_items, class_str="full-width")), display=False)

Results per CV Fold#

These errors are calculated across all strides without aggregating first per trail. Each datapoint in the boxplot represents the mean error over all strides of all trials within the test set of each fold of the 5-fold cross-validation.

Hide code cell source
tab_items = {}

for name, metric in metrics.items():
    p = SingleMetricBoxplot(cv_results, f"per_stride__{metric}", "fold", overlay_scatter=True)
    glue_name = f"fold_{metric}"
    glue_bokeh(glue_name, p.bokeh())
    tab_items[name] = glue_bokeh_md(glue_name)

glue("fold_results", Markdown(tabs(tab_items, class_str="full-width")), display=False)