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

Class AlgoSPADE



  • public class AlgoSPADE
    extends java.lang.Object
    This is an implementation of the SPADE. SPADE was proposed by ZAKI in 2001. 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 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 Summary

      Fields 
      Modifier and Type Field and Description
      long end
      Start and end points in order to calculate the overall time taken by the algorithm
      long joinCount 
      long start
      Start and end points in order to calculate the overall time taken by the algorithm
    • Constructor Summary

      Constructors 
      Constructor and Description
      AlgoSPADE(double support, boolean dfs, AbstractionCreator abstractionCreator)
      Constructor of the class that calls SPADE algorithm.
    • Field Detail

      • joinCount

        public long joinCount
      • 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

      • AlgoSPADE

        public AlgoSPADE(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()
      • getNumberOfFrequentPatterns

        public int getNumberOfFrequentPatterns()
      • getRunningTime

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

        public double getMinSupRelative()
        It gets the minimum relative 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.