Documentation of 'ca.pfv.spmf.algorithms.sequentialpatterns.spam.AlgoTKS' Java class
AlgoTKS
ca.pfv.spmf.algorithms.sequentialpatterns.spam

Class AlgoTKS



  • public class AlgoTKS
    extends java.lang.Object
    This is the original implementation of the TKS algorithm for top-k sequential patterns.

    Copyright (c) 2013 Philippe Fournier-Viger, Antonio Gomariz

    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 .
    See Also:
    Bitmap, Prefix, Pattern, Candidate
    • Constructor Summary

      Constructors 
      Constructor and Description
      AlgoTKS()
      Default constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean itemMustAppearInPatterns(int item)
      Check if an item must appear in the pattern
      void printStatistics()
      Print the statistics of the algorithm execution to System.out.
      java.util.PriorityQueue<Pattern> runAlgorithm(java.lang.String input, java.lang.String outputFilePath, int k)
      Method to run the algorithm
      void setMaximumPatternLength(int maximumPatternLength)
      Set the maximum length of patterns to be found (in terms of itemset count)
      void setMinimumPatternLength(int minimumPatternLength)
      Set the minimum length of patterns to be found (in terms of itemset count)
      void setMustAppearItems(int[] mustAppearItems)
      Optional method to specify the items that must appears in patterns found by TKS
      void writeResultTofile(java.lang.String path)
      Write the result to an output file
      • Methods inherited from class java.lang.Object

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

      • AlgoTKS

        public AlgoTKS()
        Default constructor
    • Method Detail

      • runAlgorithm

        public java.util.PriorityQueue<Pattern> runAlgorithm(java.lang.String input,
                                                             java.lang.String outputFilePath,
                                                             int k)
                                                      throws java.io.IOException
        Method to run the algorithm
        Parameters:
        input - path to an input file
        outputFilePath - path for writing the output file
        k - the number of sequential pattern to be found
        Throws:
        java.io.IOException
      • printStatistics

        public void printStatistics()
        Print the statistics of the algorithm execution to System.out.
      • writeResultTofile

        public void writeResultTofile(java.lang.String path)
                               throws java.io.IOException
        Write the result to an output file
        Parameters:
        path - the output file path
        Throws:
        java.io.IOException - exception if an error occur when writing the file.
      • setMaximumPatternLength

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

        public void setMinimumPatternLength(int minimumPatternLength)
        Set the minimum length of patterns to be found (in terms of itemset count)
        Parameters:
        minimumPatternLength - the minimum pattern length to set
      • setMustAppearItems

        public void setMustAppearItems(int[] mustAppearItems)
        Optional method to specify the items that must appears in patterns found by TKS
        Parameters:
        mustAppearItems - an array of items
      • itemMustAppearInPatterns

        public boolean itemMustAppearInPatterns(int item)
        Check if an item must appear in the pattern
        Parameters:
        item - the item
        Returns:
        true if the user has specified that this item must appear in the pattern

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.