Accelerometer-based Parkinsonian motor fluctuation detection workflows. (A) Left: A wrist-worn motion sensor (Physilog 4, Gait Up SA, CH; green circled) is used to collect unilateral tri-axial accelerometer data. X, Y, and Z represent acceleration (meters/second per second) in three axes over time (seconds). Temporal windows are determined for data analysis and are indicated in different colors over time (win1, win2, …). Center: Signal preprocessing and feature extraction convert the raw tri-axial signal into a dataset containing M features (Table S1), calculated for every temporal window (in total M columns and N rows). For the training phase of the machine learning classification models, the true labels representing medication states (*) are used. Right: In the testing phase, inserting the feature set (M × N) in the trained classification model leads to N medication state predictions. (B) Workflow to train and test individual and group models. Identical features are extracted from the raw accelerometer data of the twenty included participants (grey symbols). For the individually trained models (blue), the features from 80% of a participant’s epochs are used in the training phase (y-axis). The trained individual model is tested with the remaining, unused, 20% of epochs during the test phase. The arrows (*) from test phase to training phase represent the multiple cross-validation folds applied to train and test the individual models on different selections of training and test data. For the group models (yellow), each participant is tested in turn, with data from the other 19 participants used in the training phase.