public class RuleOrganizer extends Object
| Constructor and Description |
|---|
RuleOrganizer() |
| Modifier and Type | Method and Description |
|---|---|
ArrayList<SameLengthMotifs> |
classifyMotifs(double lengthThreshold,
GrammarRules grammarRules)
Classify the motifs based on their length.
|
protected SAXPointsNumber[] |
countPointNumber(GrammarRules grammarRules,
double[] ts)
This method counts how many times each data point is used in ANY sequitur rule (i.e.
|
SAXPointsNumber[] |
countPointNumberAfterRemoving(double[] ts,
ArrayList<SameLengthMotifs> allClassifiedMotifs)
This method counts how many times each data point is used in REDUCED sequitur rule (i.e.
|
protected boolean |
decideRemove(SAXMotif motif1,
SAXMotif motif2,
SAXPointsNumber[] pointsNumberRemoveStrategy)
Decide which one from overlapping subsequences should be removed.
|
protected ArrayList<SAXMotif> |
getAllMotifs(GrammarRules grammarRules)
Stores all the sub-sequences that generated by Sequitur rules into an array list sorted by
sub-sequence length in ascending order.
|
protected ArrayList<SameLengthMotifs> |
refinePatternsByClustering(GrammarRules grammarRules,
double[] ts,
ArrayList<SameLengthMotifs> allClassifiedMotifs,
double fractionTopDist)
Refines patterns by clustering.
|
protected ArrayList<SameLengthMotifs> |
removeOverlappingInSimiliar(ArrayList<SameLengthMotifs> allClassifiedMotifs,
GrammarRules grammarRules,
double[] ts,
double thresouldCom)
Removes overlapping rules in similar rule set.
|
public ArrayList<SameLengthMotifs> classifyMotifs(double lengthThreshold, GrammarRules grammarRules)
lengthThreshold - the motif length threshold.grammarRules - the rules set.protected ArrayList<SAXMotif> getAllMotifs(GrammarRules grammarRules)
grammarRules - the set of grammar rules.protected ArrayList<SameLengthMotifs> removeOverlappingInSimiliar(ArrayList<SameLengthMotifs> allClassifiedMotifs, GrammarRules grammarRules, double[] ts, double thresouldCom)
allClassifiedMotifs - the set of motifs classified as the same.grammarRules - the grammar.ts - the input time series.thresouldCom - the threshold.public SAXPointsNumber[] countPointNumberAfterRemoving(double[] ts, ArrayList<SameLengthMotifs> allClassifiedMotifs)
ts - the input time series.allClassifiedMotifs - the motifs classified into a same set.protected boolean decideRemove(SAXMotif motif1, SAXMotif motif2, SAXPointsNumber[] pointsNumberRemoveStrategy)
motif1 - the motif1.motif2 - the motif2.pointsNumberRemoveStrategy - the strategy for cleaning up.protected SAXPointsNumber[] countPointNumber(GrammarRules grammarRules, double[] ts)
grammarRules - the grammar.ts - the time series.protected ArrayList<SameLengthMotifs> refinePatternsByClustering(GrammarRules grammarRules, double[] ts, ArrayList<SameLengthMotifs> allClassifiedMotifs, double fractionTopDist)
grammarRules - the set of grammar rules.ts - the input time series.allClassifiedMotifs - all the motifs in groups.fractionTopDist - the fraction threshold.Copyright © 2021 JMotif. All rights reserved.