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

Class SequentialPattern

  • All Implemented Interfaces:
    java.lang.Comparable<SequentialPattern>


    public class SequentialPattern
    extends java.lang.Object
    implements java.lang.Comparable<SequentialPattern>
    This class represents a sequential pattern. A sequential pattern is a list of itemsets. 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 .
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addItemset(Itemset itemset)
      Add an itemset to this sequential pattern
      SequentialPattern cloneSequence()
      Make a copy of this sequential pattern
      int compareTo(SequentialPattern o) 
      Itemset get(int index)
      Get an itemset at a given position.
      int getAbsoluteSupport()
      Get the absolute support of this pattern.
      int getItemOccurencesTotalCount()
      Get the number of items in this pattern.
      java.util.List<Itemset> getItemsets()
      Get the itemsets in this sequential pattern
      java.lang.Integer getIthItem(int i)
      Get the ith item in this sequential pattern.
      java.lang.String getRelativeSupportFormated(int sequencecount)
      Get the relative support of this pattern (a percentage)
      java.util.Set<java.lang.Integer> getSequenceIDs() 
      java.lang.String itemsetsToString()
      Get a string representation of this sequential pattern.
      void print()
      Print this sequential pattern to System.out
      void setSequenceIDs(java.util.Set<java.lang.Integer> sequencesIds)
      Set the set of IDs of sequence containing this prefix
      int size()
      Get the number of itemsets in this sequential pattern.
      java.lang.String toString()
      Get a string representation of this sequential pattern, containing the sequence IDs of sequence containing this pattern.
      • Methods inherited from class java.lang.Object

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

      • SequentialPattern

        public SequentialPattern()
        Defaults constructor
      • SequentialPattern

        public SequentialPattern(Itemset itemset,
                                 java.util.Set<java.lang.Integer> sequencesIds)
      • SequentialPattern

        public SequentialPattern(java.util.List<Itemset> itemsets,
                                 java.util.Set<java.lang.Integer> sequencesIds)
    • Method Detail

      • setSequenceIDs

        public void setSequenceIDs(java.util.Set<java.lang.Integer> sequencesIds)
        Set the set of IDs of sequence containing this prefix
        Parameters:
        a - set of integer containing sequence IDs
      • getRelativeSupportFormated

        public java.lang.String getRelativeSupportFormated(int sequencecount)
        Get the relative support of this pattern (a percentage)
        Parameters:
        sequencecount - the number of sequences in the original database
        Returns:
        the support as a string
      • getAbsoluteSupport

        public int getAbsoluteSupport()
        Get the absolute support of this pattern.
        Returns:
        the support (an integer >= 1)
      • addItemset

        public void addItemset(Itemset itemset)
        Add an itemset to this sequential pattern
        Parameters:
        itemset - the itemset to be added
      • cloneSequence

        public SequentialPattern cloneSequence()
        Make a copy of this sequential pattern
        Returns:
        the copy.
      • print

        public void print()
        Print this sequential pattern to System.out
      • toString

        public java.lang.String toString()
        Get a string representation of this sequential pattern, containing the sequence IDs of sequence containing this pattern.
        Overrides:
        toString in class java.lang.Object
      • itemsetsToString

        public java.lang.String itemsetsToString()
        Get a string representation of this sequential pattern.
      • getItemsets

        public java.util.List<Itemset> getItemsets()
        Get the itemsets in this sequential pattern
        Returns:
        a list of itemsets.
      • get

        public Itemset get(int index)
        Get an itemset at a given position.
        Parameters:
        index - the position
        Returns:
        the itemset
      • getIthItem

        public java.lang.Integer getIthItem(int i)
        Get the ith item in this sequential pattern.
        Parameters:
        i - the position of the item.
        Returns:
        the item or null if the position does not exist.
      • size

        public int size()
        Get the number of itemsets in this sequential pattern.
        Returns:
        the number of itemsets.
      • getItemOccurencesTotalCount

        public int getItemOccurencesTotalCount()
        Get the number of items in this pattern. Note that if an item appear twice, it will be counted twice.
        Returns:
        the number of items
      • getSequenceIDs

        public java.util.Set<java.lang.Integer> getSequenceIDs()

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.