Пример #1
0
        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);
        }
Пример #2
0
 public FPTreeNode(FPTreeTableRecordItem item, FPTreeNode parent)
 {
     Item = item;
     Parent = parent;
     Children = new List<FPTreeNode>();
 }
Пример #3
0
 public FPTreeNode()
 {
     Item = null;
     Parent = null;
     Children = new List<FPTreeNode>();
 }