|
Algorithm 1 Top rule patterns. |
| 1: |
function (TRP): |
|
| 2: |
valid_sections = list() |
|
| 3: |
sections = slope_analysis(T) |
▹ Returns the partitioned series |
| 4: |
if preTRP then
|
|
| 5: |
T = concatenate(basic_rules(sections)) |
|
| 6: |
sections = standardize(sections) |
|
| 7: |
end if
|
|
| 8: |
grammar = SAX_grammar(T,w,a,p) |
|
| 9: |
for section in sections do
|
|
| 10: |
if basic_rules(section) then
|
|
| 11: |
mean_coverage = get_coverage(section, grammar) |
|
| 12: |
if mean_coverage ≥ 3.0 then
|
|
| 13: |
valid_sections.append(section.id) |
|
| 14: |
end if
|
|
| 15: |
end if
|
|
| 16: |
end for
|
|
| 17: |
return (valid_sections) |
|
| 18: |
end function |
|