Documentation of 'ca.pfv.spmf.algorithms.sequentialpatterns.prefixSpan_AGP.AlgoPrefixSpan_AGP' Java class
AlgoPrefixSpan_AGP
ca.pfv.spmf.algorithms.sequentialpatterns.prefixSpan_AGP

Class AlgoPrefixSpan_AGP



  • public class AlgoPrefixSpan_AGP
    extends java.lang.Object
    This is an implementation of the PrefixSpan algorithm by Antonio Gomariz Peñalver(AGP). PrefixSpan was proposed by Pei et al. 2001. This algorithm was inspired in the implementation of SPMF and, from it, I changed and optimized some things.

    NOTE: This implementation saves the pattern to a file as soon as they are found or can keep the pattern into memory if no output path is provided by the user.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void clear()
      It clears all the attributes of AlgoPrefixSpan class
      double getAbsoluteMinSupport()
      It gets the absolute minimum support, i.e.
      int getNumberOfFrequentPatterns()
      Get the number of frequent patterns found.
      long getRunningTime()
      It gets the time spent by the algoritm in its execution.
      java.lang.String printStatistics()
      Method to get the outlined information about the search for frequent sequences by means of PrefixSpan algorithm as a string.
      void runAlgorithm(SequenceDatabase database, boolean keepPatterns, boolean verbose, java.lang.String outputFilePath)
      Method that starts the execution of the algorithm.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AlgoPrefixSpan_AGP

        public AlgoPrefixSpan_AGP(double minsupRelative,
                                  AbstractionCreator creator)
        Standard constructor. It takes the minimum support threshold (from 1 up to 0) and an abstraction creator
        Parameters:
        minsupRelative - the relative minimum support threshold
        creator - the abstraction creator
    • Method Detail

      • runAlgorithm

        public void runAlgorithm(SequenceDatabase database,
                                 boolean keepPatterns,
                                 boolean verbose,
                                 java.lang.String outputFilePath)
                          throws java.io.IOException
        Method that starts the execution of the algorithm.
        Parameters:
        database - The original database in which we apply PrefixSpan
        keepPatterns - Flag indicating if the user want to keep the frequent patterns or he just want the amount of them
        verbose - Flag for debugging purposes
        outputFilePath - Path pointing out to the file where the output, composed of frequent patterns, has to be kept. If, conversely, this parameter is null, we understand that the user wants the output in the main memory
        Throws:
        java.io.IOException
      • printStatistics

        public java.lang.String printStatistics()
        Method to get the outlined information about the search for frequent sequences by means of PrefixSpan algorithm as a string.
        Returns:
        a string
      • getNumberOfFrequentPatterns

        public int getNumberOfFrequentPatterns()
        Get the number of frequent patterns found.
        Returns:
        the number of frequent patterns.
      • getRunningTime

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

        public double getAbsoluteMinSupport()
        It gets the absolute minimum support, i.e. the minimum number of database sequences where a pattern has to appear
        Returns:
        the minimum support (double)
      • 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.