Algorithm 1 Detecting at most one change-point |
Input: sequence of ordinal patterns of order d, nominal probability of false alarm
Output: estimate of a change-point if change-point is detected, otherwise return 0.
-
1:
functionDetectSingleCP(, )
-
2:
← ;
-
3:
if
then
-
4:
return 0; ▷ sequence is too short, no change-point can be detected
-
5:
end if
-
6:
← ;
-
7:
← ; ▷ number of bootstrap samples for computing threshold
-
8:
for
do ▷ computing threshold by reshuffling
-
9:
← randomly shuffled blocks of length from ;
-
10:
← ;
-
11:
end for
-
12:
← Sort(); ▷ sort the maximal values of for bootstrap samples in decreasing order
-
13:
h ←
-
14:
if
then
-
15:
return 0;
-
16:
else
-
17:
return
;
-
18:
end if
-
19:
end function
|