Algorithm 2 Detecting multiple change-points |
Input: sequence of ordinal patterns of order d, nominal probability of false alarm.
Output: estimates of the number of stationary segments and of their boundaries .
-
1:
functionDetectAllCP(, )
-
2:
; ; ; ▷ Step 1
-
3:
repeat
-
4:
← DetectSingleCP(), ;
-
5:
if
then
-
6:
Insert
to the list of change-points after and renumber change-points ;
-
7:
← ;
-
8:
else
-
9:
k ← ;
-
10:
end if
-
11:
until
;
-
12:
k ← 0; ▷ Step 2
-
13:
repeat
-
14:
← DetectSingleCP(, );
-
15:
if
then
-
16:
← ;
-
17:
k ← ;
-
18:
else
-
19:
Delete
from the change-points list and renumber change-points ;
-
20:
← ;
-
21:
end if
-
22:
until
;
-
23:
return
;
-
24:
end function
|