Skip to main content
. 2022 May 27;24(6):759. doi: 10.3390/e24060759
Algorithm 2: GTAD Detection Algorithm
Input: Dataset X = {x1, …, xN}, parameter θ
Output: Labels y: {yM+1, …, yN}
for t = L to M do
  xti _← GTAD (xt-L:t-1)
  _xtl:t1i← GTAD (xt-L+1:t)
   et=xtixti+θj=tL+1t(xjixji)
end for
 Threshold λ = threshold function (e1, …, eM)
for t = M + 1 to N do
  xrti, _← GTAD (xt-L:t-1)
  _xtL+1:ti← GTAD (xt-L+1:t)
   et=xtixti+θj=tL+1t(xjixji)
  If et > λ then
   yt = 1
   else
   yt = 0
    end if
end for