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

Class Sequences



  • public class Sequences
    extends java.lang.Object
    Inspired in SPMF This class implements a list of frequent sequence lists (or frequent pattern lists) that it is organized by levels. That level contains all of sequences that have a concrete number of items. Therefore, we allocate 1-sequences in level 1, 2-sequences in level 2, and so forth... Copyright Antonio Gomariz Peñalver 2013 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 .
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      java.util.List<java.util.List<Pattern>> levels
      List of lists, where each list contains the frequent patterns of a concrete length
      int numberOfFrequentSequences
      Number of frequent sequences
    • Constructor Summary

      Constructors 
      Constructor and Description
      Sequences(java.lang.String string) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addSequence(Pattern sequence, int levelIndex)
      Method that adds a sequence in a given level
      void addSequences(java.util.List<Pattern> sequences, int levelIndex)
      Method that adds a sequence set in a given level
      void clear()
      It clears the structure
      void delete(int i)
      It completely deletes a concrete level of sequences
      java.util.List<Pattern> getLevel(int index)
      Get the frequent sequences that appear in a particular level
      int getLevelCount()
      It gives us the total number of levels.
      java.util.List<java.util.List<Pattern>> getLevels()
      It obtains a list of pattern lists, being each pattern list the frequent sequences with a concrete length For example, at position 1, it is the list of patterns of size 1.
      void printFrequentSequences()
      Print all the levels of the structure in the standard output
      int size()
      It returns the total number of sequences
      void sort()
      Method to sort each level of the structure
      java.lang.String toString()
      Method that give us in a string the content of all Sequences structure
      java.lang.String toStringToFile()
      Method that give us in a string the content of all Sequences structure in a SPMF format
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • levels

        public java.util.List<java.util.List<Pattern>> levels
        List of lists, where each list contains the frequent patterns of a concrete length
      • numberOfFrequentSequences

        public int numberOfFrequentSequences
        Number of frequent sequences
    • Constructor Detail

      • Sequences

        public Sequences(java.lang.String string)
    • Method Detail

      • printFrequentSequences

        public void printFrequentSequences()
        Print all the levels of the structure in the standard output
      • toString

        public java.lang.String toString()
        Method that give us in a string the content of all Sequences structure
        Overrides:
        toString in class java.lang.Object
        Returns:
        the string
      • toStringToFile

        public java.lang.String toStringToFile()
        Method that give us in a string the content of all Sequences structure in a SPMF format
        Returns:
        the string
      • addSequence

        public void addSequence(Pattern sequence,
                                int levelIndex)
        Method that adds a sequence in a given level
        Parameters:
        sequence - a sequence to add
        levelIndex - the level where the sequence must be
      • addSequences

        public void addSequences(java.util.List<Pattern> sequences,
                                 int levelIndex)
        Method that adds a sequence set in a given level
        Parameters:
        sequences - a sequence list to add
        levelIndex - the level where the sequence must be
      • getLevel

        public java.util.List<Pattern> getLevel(int index)
        Get the frequent sequences that appear in a particular level
        Parameters:
        index - the frequent sequences of that level
        Returns:
        the list of pattern of this level
      • getLevelCount

        public int getLevelCount()
        It gives us the total number of levels. Notice that we discount the level 0
        Returns:
        the number of levels.
      • getLevels

        public java.util.List<java.util.List<Pattern>> getLevels()
        It obtains a list of pattern lists, being each pattern list the frequent sequences with a concrete length For example, at position 1, it is the list of patterns of size 1. at position 2, it is the list of patterns of size 2 ... etc.
        Returns:
        the list of pattern lists.
      • size

        public int size()
        It returns the total number of sequences
        Returns:
        the total number of sequences
      • sort

        public void sort()
        Method to sort each level of the structure
      • delete

        public void delete(int i)
        It completely deletes a concrete level of sequences
        Parameters:
        i -
      • clear

        public void clear()
        It clears the structure

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.