[Home] DMelt member access. Java source code: ca.pfv.spmf.algorithms.sequentialpatterns.spam.AlgoVGEN
package ca.pfv.spmf.algorithms.sequentialpatterns.spam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.BitSet;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import ca.pfv.spmf.patterns.itemset_list_integers_without_support.Itemset;
import ca.pfv.spmf.tools.MemoryLogger;
/**
* *
* This is an implementation of the VGEN algorithm.
*
*
* Copyright (c) 2014 Philippe Fournier-Viger, Antonio Gomariz
*
*
* This file is part of the SPMF DATA MINING SOFTWARE
* (http://www.philippe-fournier-viger.com/spmf).
*
*
* SPMF is free software: you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
*
* SPMF is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License along with
* SPMF. If not, see .
*
* @see Bitmap
* @see PrefixVGEN
* @see PatternVGEN
* @author Philippe Fournier-Viger & Antonio Gomariz
*/
public class AlgoVGEN {
// for statistics
public long startTime;
public long endTime;
public int patternCount;
// minsup
private int minsup = 0;
// object to write to a file
BufferedWriter writer = null;
// Vertical database
Map verticalDB = new HashMap();
// List indicating the number of bits per sequence
List sequencesSize = null;
int lastBitIndex = 0; // the last bit position that is used in bitmaps
// maximum pattern length in terms of item count
private int maximumPatternLength = Integer.MAX_VALUE;
// Map: key: item value: another item that followed the first item + support
// (could be replaced with a triangular matrix...)
Map> coocMapAfter = null;
Map> coocMapEquals = null;
// Map indicating for each item, the smallest tid containing this item
// in a sequence.
boolean useCMAPPruning = true;
// ========= VARIABLES THAT ARE SPECIFIC TO VGEN ===================
// GENERATOR PATTERNS - The list contains patterns of size k at position k in the list.
// A map has the sum of sids as key and lists of patterns as value.
List
Ads help maintain this website.