| 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 |