Class SequentialPatterns


  • public class SequentialPatterns
    extends java.lang.Object
    A set of sequential patterns grouped by their size (how many items they have). Copyright (c) 2008-2013 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 Summary

      Constructors 
      Constructor Description
      SequentialPatterns​(java.lang.String name)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addSequence​(SequentialPattern sequence, int k)
      Add a sequential pattern to this set of sequential patterns.
      java.util.List<SequentialPattern> getLevel​(int index)
      Get all the sequential patterns of a given size.
      int getLevelCount()
      Get the maximum size of sequential patterns + 1.
      java.util.List<java.util.List<SequentialPattern>> getLevels()
      Get a list of list of sequential patterns such that at position i, there is a list of sequential patterns containing i items.
      void printFrequentPatterns​(int nbObject, boolean showSequenceIdentifiers)
      Print all sequential patterns to System.out.
      java.lang.String toString​(int nbObject, boolean showSequenceIdentifiers)
      Get a string representation of this set of sequential patterns.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • sequenceCount

        public int sequenceCount
    • Constructor Detail

      • SequentialPatterns

        public SequentialPatterns​(java.lang.String name)
        Constructor
        Parameters:
        name - a name to give to this set of patterns
    • Method Detail

      • printFrequentPatterns

        public void printFrequentPatterns​(int nbObject,
                                          boolean showSequenceIdentifiers)
        Print all sequential patterns to System.out.
        Parameters:
        nbObject - the size of the original database in terms of sequences.
        showSequenceIdentifiers - if true, sequence identifiers will be output for each pattern
      • toString

        public java.lang.String toString​(int nbObject,
                                         boolean showSequenceIdentifiers)
        Get a string representation of this set of sequential patterns.
        Parameters:
        nbObject - the number of sequences in the database where these patterns were found.
        showSequenceIdentifiers - if true, sequence identifiers will be output for each pattern
        Returns:
        a string
      • addSequence

        public void addSequence​(SequentialPattern sequence,
                                int k)
        Add a sequential pattern to this set of sequential patterns.
        Parameters:
        sequence - the sequential pattern
        k - the size of the sequential pattern in temrs of itemset.
      • getLevel

        public java.util.List<SequentialPattern> getLevel​(int index)
        Get all the sequential patterns of a given size.
        Parameters:
        index - the size in terms of items.
        Returns:
        a list of sequential patterns.
      • getLevelCount

        public int getLevelCount()
        Get the maximum size of sequential patterns + 1.
        Returns:
        the maximum size.
      • getLevels

        public java.util.List<java.util.List<SequentialPattern>> getLevels()
        Get a list of list of sequential patterns such that at position i, there is a list of sequential patterns containing i items.
        Returns: