mad-lab-fau / gaitmap

The Gait and Movement Analysis Package
https://gaitmap.readthedocs.io
Other
40 stars 2 forks source link

Docu for pretrained HMM #8

Closed AKuederle closed 1 year ago

AKuederle commented 1 year ago

@nilsroth HMM branch is merged ;) The only thing missing is a little bit of docu about your pre-trained model.

I.e. what dataset was it trained on, what specifications, what to expect with regards to performance, when to use it/when not to use it. Could you write a couple of sentences? If you just put it in the response here, I will add it to the code.

Thanks!

nilsroth commented 1 year ago

Do you mean infos on the "fallriskpd_at_lab_model.json"?

nilsroth commented 1 year ago

Trained on pre_visit at lab recordings of the first 28 fallriskpd patient datasets (according to JNER FallRiskPD HMM publication)

Expected performance (from Roth et. al., JNER, 2021): on at lab data ca. 96% F1 score and on real-world data ca. 92% F1 score.

Only for level walking, trained on PD data

Use for general segmentation of straight strides, will probably also segment turning strides as it only considers gyr_ml data (if only straight strides are desired, strides might require filtering by turning angle!)

Model Settings:

n_gmm_components_stride = 8 n_gmm_components_transition = 8 n_states_stride = 25 n_states_transition = 5

preprocessing_settings = {"sampling_frequency_hz": 102.4, "cutoff_hz": 10.0, "order": 4, "downsample_factor": 2} feature_settings = { "window_size_samples": 11, "standardization": True, "axis": ['gyr_ml'], "features": ['raw','gradient'], "sensors": ["left", "right"], "synchronized": False, }

hmm_settings = { "hmm_settings_stride": { "n_states": n_states_stride, "architecture": "left-right-strict", "n_gmm_components": n_gmm_components_stride, "algo_train": "baum-welch", "stop_threshold": stop_threshold, "max_iterations": max_iterations, "random_seed": "None", }, "hmm_settings_transition": { "n_states": n_states_transition, "architecture": "left-right-loose", "n_gmm_components": n_gmm_components_transition, "algo_train": "baum-welch", "stop_threshold": stop_threshold, "max_iterations": max_iterations, "random_seed": "None", }, "hmm_settings_combined": { "algo_predict": "viterbi", "algo_train": "labeled", "stop_threshold": stop_threshold, "max_iterations": 1, "initialization": "labels", }, }

AKuederle commented 1 year ago

Added! Thanks @nilsroth :)