Skip to main content
. 2020 Oct 12;20(20):5766. doi: 10.3390/s20205766
Subroutine 1Candidate Patterns Extracting (D,|E|)

Input: Data set D, event cardinality K

Output: Ordered candidate pattern set C

  • 1:

    C,Map=set(seq,importance)

  • 2:

    fordiDdo

  • 3:

    for w sub-string of di with |w|[2,min{|di|,K}] do

  • 4:

      num frequency of w in di

  • 5:

      if num>1 then

  • 6:

       Map.add(w,0) if wMap.keys()

  • 7:

       importanceimportance+len(w)×num

  • 8:

      end if

  • 9:

    end for

  • 10:

    end for

  • 11:

    Order the Map based on importance in a descending order

  • 12:

    returnMap.keys()