Documentation of 'ca.pfv.spmf.algorithms.sequentialpatterns.BIDE_and_prefixspan.AlgoPrefixSpan' Java class
AlgoPrefixSpan
ca.pfv.spmf.algorithms.sequentialpatterns.BIDE_and_prefixspan

Class AlgoPrefixSpan



  • public class AlgoPrefixSpan
    extends java.lang.Object
    This is an implementation of the PrefixSpan algorithm. PrefixSpan was proposed by Pei et al. 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 (c) 2008-2012 Philippe Fournier-Viger 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 .
    • Constructor Detail

      • AlgoPrefixSpan

        public AlgoPrefixSpan()
        Default constructor
    • Method Detail

      • runAlgorithm

        public SequentialPatterns runAlgorithm(SequenceDatabase database,
                                               double minsupRelative,
                                               java.lang.String outputFilePath)
                                        throws java.io.IOException
        Run the algorithm
        Parameters:
        database - : a sequence database
        minsupRelative - : the minimum support as a percentage (e.g. 50%) as a value in [0,1]
        outputFilePath - : the path of the output file to save the result or null if you want the result to be saved into memory
        Returns:
        return the result, if saved into memory, otherwise null
        Throws:
        java.io.IOException - exception if error while writing the file
      • runAlgorithm

        public SequentialPatterns runAlgorithm(SequenceDatabase database,
                                               java.lang.String outputFilePath,
                                               int minsup)
                                        throws java.io.IOException
        Run the algorithm
        Parameters:
        database - : a sequence database
        minsupPercent - : the minimum support as an integer
        outputFilePath - : the path of the output file to save the result or null if you want the result to be saved into memory
        Returns:
        return the result, if saved into memory, otherwise null
        Throws:
        java.io.IOException - exception if error while writing the file
      • printStatistics

        public void printStatistics(int size)
        Print statistics about the algorithm execution to System.out.
        Parameters:
        size - the size of the database
      • getMaximumPatternLength

        public int getMaximumPatternLength()
        Get the maximum length of patterns to be found (in terms of item count)
        Returns:
        the maximumPatternLength
      • setMaximumPatternLength

        public void setMaximumPatternLength(int maximumPatternLength)
        Set the maximum length of patterns to be found (in terms of item count)
        Parameters:
        maximumPatternLength - the maximumPatternLength to set

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.