Skip to main content
. 2021 Aug 17;23(8):1064. doi: 10.3390/e23081064
Algorithm 2 Perturbation duration.
  • 1:

    procedurePertDuration(y,yocc,TMAE)

  • 2:

        wsized        ▹ user-defined size

  • 3:

        mael empty list

  • 4:

        sSegment(y,wsize)

  • 5:

        soccSegment(yocc,wsize)

  • 6:

        for all sis do

  • 7:

            ϵmae(si,socci)

  • 8:

            Append ϵ to mael

  • 9:

        end for

  • 10:

        wc0

  • 11:

        for all ϵmael do

  • 12:

            if ϵ>TMAE then

  • 13:

               wcwc+1

  • 14:

            end if

  • 15:

        end for

  • 16:

        return wc        ▹ n. windows with MAE > TMAE

  • 17:

    end procedure