Documentation of 'ca.pfv.spmf.algorithms.sequentialpatterns.gsp_AGP.AlgoGSP' Java class
AlgoGSP
ca.pfv.spmf.algorithms.sequentialpatterns.gsp_AGP

Class AlgoGSP



  • public class AlgoGSP
    extends java.lang.Object
    This is an implementation of the GSP algorithm. GSP was proposed by Srikant and Agrawal 1996.

    NOTE: This implementation saves the patterns to a file as soon as a level of patterns is found or can keep the patterns into memory if no output path is provided by the user.
    • Constructor Summary

      Constructors 
      Constructor and Description
      AlgoGSP(double minSupRelative, double mingap, double maxgap, double windowSize, AbstractionCreator abstractionCreator)
      Constructor for GSP algorithm.
    • Constructor Detail

      • AlgoGSP

        public AlgoGSP(double minSupRelative,
                       double mingap,
                       double maxgap,
                       double windowSize,
                       AbstractionCreator abstractionCreator)
        Constructor for GSP algorithm. It initializes most of the class' attributes.
    • Method Detail

      • runAlgorithm

        public Sequences runAlgorithm(SequenceDatabase database,
                                      boolean keepPatterns,
                                      boolean verbose,
                                      java.lang.String outputFilePath)
                               throws java.io.IOException
        Method that runs the GSP algorithm in the database given as parameter.
        Parameters:
        database - a sequence database
        keepPatterns - flag activated if we want to keep the resulting patterns or not
        verbose - flat activated for debugging purposes
        outputFilePath - an output file path
        Returns:
        the frequent sequences found in the original database
        Throws:
        java.io.IOException
      • printStatistics

        public java.lang.String printStatistics()
        Method to print some statistics about the execution. It uses the standard format.
        Returns:
        a String with the information in it.
      • printedOutputToSaveInFile

        public java.lang.String printedOutputToSaveInFile()
        Method to print some statistics about the execution. It uses the optional format.
        Returns:
        a String with the information in it
      • getNumberOfFrequentPatterns

        public int getNumberOfFrequentPatterns()
        Returns:
        The number of frequent sequences found by GSP in the last execution
      • getPatterns

        public java.lang.String getPatterns()
        Returns:
        the frequent patterns found by the last execution of GSP. It only works under a Save_To_Memory option.
      • runningTime

        public long runningTime()
        Time that GSP takes completing the execution
        Returns:
        the runtime as a long
      • getMinSupAbsolut

        public double getMinSupAbsolut()
        Return the absolute minimum support, i.e. the minimum number of sequences where a patter must appear
        Returns:
        the minsup value
      • clear

        public void clear()
        It cleans the most important attributes.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.