1: |
// Build empirical distribution Dîst of the test statistic. |
2: |
Σ1, Σ2 = two sets of activity curves |
3: |
Np = number of permutations |
4: |
initialize
Dîst as Np × m matrix |
▷ m is # activity distributions in the activity curves |
5: |
initialize
i = 0 |
6: |
while
i < Np
do : |
7: |
Shuffle the activity curves. |
8: |
Generate aggregated activity curves CΣ1 and CΣ2 by aggregating the distributions in Σ1, Σ2
|
9: |
Using the time interval-based alignment technique, align the two aggregated activity curves to obtain an alignment vector Γ
|
10: |
for all alignment pairs (u, u) in Γ do : |
11: |
Find a distance SDKL(D1,u‖D2,u) between uth activity distributions in two activity curves. |
12: |
Insert SDKL (D1,u‖D2,u) to empirical distribution Dîst at location [i, u]. |
13: |
end for
|
14: |
i = i+1 |
15: |
end while |
16: |
return Dîst
|