Input: prefix prefix, temporal symbolic sequence databases TDB, key item c_item, minimum support min_sup, minimum |
repeat count min_rep, maximum period max_per, maximum interference distance max_dis. |
() hash_item〈item_id, (count, tids)〉; |
() FOR each tuple in DO |
() IF , THEN |
() hash_item[].count++; hash_item[].tid ← ; |
() IF , THEN |
() //prefix.litemset is the last item of prefix |
() hash_item[].count++; hash_item[].tid ← ; |
() ENDFOR |
() FOR each key in hash_item DO |
() IF THEN delete hash_item[]; |
() ENDFOR |
() FOR each key c in hash_item DO |
() ASPDetector (, hash_item[], _item, prefix, min_sup, min_rep, max_per, max_dis); |
() IF can be extended to prefix THEN |
() newprefix ← extend(, prefix); |
() ← Projectdatabase (, ); |
() IF prefix notcontain _item THEN |
() delete tuples in which not contain _item; |
() IF min_sup ≤ THEN |
() AP-PrefixspanM(newprefix, , _item, min_sup, min_rep, max_per, max_dis); |
() ENDFOR |