The "modified_emlearn" code is a modified version of the emlearn library developed by Jon Nordby and available here. (Licensed under the MIT License)
Instructions
Main implementation is in "main_c_har.py".
Baseline approach is in "baseline_approach.py".
Iterative search for optimal prs sequence for each axis is in "iterative_prs_axis.py".
For the MCU implementation in "mcu_c_har.py", the generated files "lab_Gx.txt" and "c_mea_Gx.txt" need to be loaded onto the microcontroller (via SD card for example), and the corresponding "classifier_to_test_Gx.h" needs to be loaded onto the MCU, along with the rest of the .h and .ino files (or .c files depending on MCU/board). You also need the "eml_trees.h" file from the "modified_emlearn" folder.