Beispiel #1
0
        override public void Mine(int support, int minLength, int maxLength, int maxMistakes, MineResults mineResult)
        {
            IntListPool.Instance.Clear();

            ItemsetBasic head = new ItemsetBasic(_ds.GetColumnCount());
            IntList      tail = new IntList(_ds.GetColumnCount());

            // Build all items tail
            for (int loop = 0; loop < _ds.GetColumnCount(); loop++)
            {
                tail.Add(loop);
            }

            List <DFSLevelItem> levelItems = new List <DFSLevelItem>();

            // Build first level look-ahead
            for (int loop = 0; loop < tail.Count; loop++)
            {
                int i = tail[loop];

                IntList newTail = (IntList)tail.Clone();
                newTail.RemoveAt(loop);

                ItemsetBasic newHead = new ItemsetBasic(tail.Count);
                newHead.AddItem(i);
                newHead.support = _ds.RowCount;

                levelItems.Add(new DFSLevelItem(newHead, newTail));
            }

            RecurseMining(levelItems, support, minLength, maxLength, mineResult);
        }
Beispiel #2
0
        override public void Mine(int support, int minLength, int maxLength, int maxMistakes, MineResults mineResult)
        {
            IntListPool.Instance.Clear();

            ItemsetBasic head = new ItemsetBasic(_ds.GetColumnCount());
            IntList      tail = new IntList(_ds.GetColumnCount());

            for (int loop = 0; loop < _ds.GetColumnCount(); loop++)
            {
                tail.Add(loop);
            }

            RecurseMining(head, tail, support, minLength, maxLength, mineResult);
        }