Skip to main content
. 2022 Mar 17;22(6):2321. doi: 10.3390/s22062321
Algorithm A1: Activity Score Calculation (1D data).
 Data: hour_dataset, threshold, window_size
 Result: score
 nt ← number_of_rows(hour_dataset);
 A ← hour_dataset [all rows, from 0 to 16];
 B ← MovingWindowAverage(A, window_size);
 Subst ← A-B;
 max_values ← max(subst for axis = time where values ≥ threshold);
 counter ← count(max_values);
 if nt equal to 0 then
  score ← 0;
 else
  score ← (counter/nt)×100;
 end