public FPTree(Arff source, int minimumCoverage, int maximumItemSetSize, double minimumAccuracy, int resultSize) { //load input Source = source; MinimumCoverage = minimumCoverage; MaximumItemSetSize = maximumItemSetSize; MinimumAccuracy = minimumAccuracy; ResultSize = resultSize; //initiate Root Root = new FPTreeNode(); //local variables ItemSet ItemSet; ItemSet HighFrequencyOneItemSet; FPTreeTable FPTreeTable; //get the size 1 ItemSet ItemSet = new ItemSet(Source); //initiate High Frequency 1-item set HighFrequencyOneItemSet = ItemSet.DeepCopy(); HighFrequencyOneItemSet.MeetMinimumCoverage(MinimumCoverage); HighFrequencyOneItemSet.OrderByFrequencyDescending(); //initiate FPTreeTable FPTreeTable = new FPTreeTable(Source, HighFrequencyOneItemSet); //build FPTree BuildFPTreeFromRoot(FPTreeTable); }
public FPTreeNode(FPTreeTableRecordItem item, FPTreeNode parent) { Item = item; Parent = parent; Children = new List<FPTreeNode>(); }
public FPTreeNode() { Item = null; Parent = null; Children = new List<FPTreeNode>(); }