Documentation of 'ca.pfv.spmf.algorithms.sequentialpatterns.spade_spam_AGP.AlgoCMSPADE' Java class
AlgoCMSPADE
ca.pfv.spmf.algorithms.sequentialpatterns.spade_spam_AGP

Class AlgoCMSPADE



  • public class AlgoCMSPADE
    extends java.lang.Object
    This is an implementation of the CM-SPADE algorithm. SPADE was proposed by ZAKI in 2001. This is a modified version with coocurence maps. NOTE: This implementation saves the pattern to a file as soon as they are found or can keep the pattern into memory, depending on what the user choose. Copyright Antonio Gomariz Peñalver 2013, modified by Philippe Fournier-Viger, 2013 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 .
    • Field Detail

      • minSupAbsolute

        public double minSupAbsolute
        The absolute minimum support threshold, i.e. the minimum number of sequences where the patterns have to be
      • start

        public long start
        Start and end points in order to calculate the overall time taken by the algorithm
      • end

        public long end
        Start and end points in order to calculate the overall time taken by the algorithm
    • Constructor Detail

      • AlgoCMSPADE

        public AlgoCMSPADE(double support,
                           boolean dfs,
                           AbstractionCreator abstractionCreator)
        Constructor of the class that calls SPADE algorithm.
        Parameters:
        support - Minimum support (from 0 up to 1)
        dfs - Flag for indicating if we want a depth first search. If false, we indicate that we want a breath-first search.
        abstractionCreator - An abstraction creator.
    • Method Detail

      • runAlgorithm

        public void runAlgorithm(SequenceDatabase database,
                                 CandidateGenerator candidateGenerator,
                                 boolean keepPatterns,
                                 boolean verbose,
                                 java.lang.String outputFilePath)
                          throws java.io.IOException
        Actual call to SPADE algorithm. The output can be either kept or ignore. Whenever we choose to keep the patterns found, we can keep them in a file or in the main memory
        Parameters:
        database - Original database in where we want to search for the frequent patterns.
        candidateGenerator - The candidate generator used by the algorithm SPADE
        keepPatterns - Flag indicating if we want to keep the output or not
        verbose - Flag for debugging purposes
        outputFilePath - Path of the file in which we want to store the frequent patterns. If this value is null, we keep the patterns in the main memory. This argument is taken into account just when keepPatterns is activated.
        Throws:
        java.io.IOException
      • runAlgorithmParallelized

        public void runAlgorithmParallelized(SequenceDatabase database,
                                             CandidateGenerator candidateGenerator,
                                             boolean keepPatterns,
                                             boolean verbose,
                                             java.lang.String outputFilePath)
                                      throws java.io.IOException
        Actual call to SPADE algorithm. The output can be either kept or ignore. Whenever we choose to keep the patterns found, we can keep them in a file or in the main memory. The algorithm SPADE is executed in a parallel way.
        Parameters:
        database - Original database in where we want to search for the frequent patterns.
        candidateGenerator - The candidate generator used by the algorithm SPADE
        keepPatterns - Flag indicating if we want to keep the output or not
        verbose - Flag for debugging purposes
        outputFilePath - Path of the file in which we want to store the frequent patterns. If this value is null, we keep the patterns in the main memory. This argument is taken into account just when keepPatterns is activated.
        Throws:
        java.io.IOException
      • printStatistics

        public java.lang.String printStatistics()
      • getIntersectionCounter

        public int getIntersectionCounter()
      • getNumberOfFrequentPatterns

        public int getNumberOfFrequentPatterns()
      • getRunningTime

        public long getRunningTime()
        It gets the time spent by the algoritm in its execution.
        Returns:
      • getAbsoluteMinimumSupport

        public double getAbsoluteMinimumSupport()
        It gets the absolute minimum support, i.e. the minimum number of database sequences where a pattern has to appear
        Returns:
      • clear

        public void clear()
        It clears all the attributes of AlgoPrefixSpan class

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.