Documentation of 'ca.pfv.spmf.input.sequence_database_list_strings.Sequence' Java class
Sequence
ca.pfv.spmf.input.sequence_database_list_strings

Class Sequence



  • public class Sequence
    extends java.lang.Object
    Implementation of a sequence as a list of itemsets, where an itemset is a list of strings.
    See Also:
    SequenceDatabase
    • Constructor Summary

      Constructors 
      Constructor and Description
      Sequence(int id)
      Constructor of a sequence
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addItemset(java.util.List<java.lang.String> itemset)
      Add an itemset to this sequence.
      java.util.List<java.lang.String> cloneItemsetMinusItems(java.util.List<java.lang.String> itemset, java.util.Map<java.lang.String,java.util.Set<java.lang.Integer>> mapSequenceID, double relativeMinsup)
      Make a copy of an itemset while removing some items that are infrequent with respect to a threshold minsup.
      Sequence cloneSequenceMinusItems(java.util.Map<java.lang.String,java.util.Set<java.lang.Integer>> mapSequenceID, double relativeMinSup)
      Make a copy of this sequence while removing some items that are infrequent with respect to a threshold minsup.
      java.util.List<java.lang.String> get(int index)
      Get the itemset at a given position in this sequence
      int getId()
      Get the sequence ID of this sequence.
      java.util.List<java.util.List<java.lang.String>> getItemsets()
      Get the list of itemsets in this sequence
      void print()
      Print this sequence to System.out.
      int size()
      Get the size of this sequence (number of itemsets).
      java.lang.String toString()
      Return a string representation of this sequence.
      • Methods inherited from class java.lang.Object

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

      • Sequence

        public Sequence(int id)
        Constructor of a sequence
        Parameters:
        id - a sequence id that should be unique.
    • Method Detail

      • addItemset

        public void addItemset(java.util.List<java.lang.String> itemset)
        Add an itemset to this sequence.
        Parameters:
        itemset - An itemset (list of strings).
      • print

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

        public java.lang.String toString()
        Return a string representation of this sequence.
        Overrides:
        toString in class java.lang.Object
      • getId

        public int getId()
        Get the sequence ID of this sequence.
      • getItemsets

        public java.util.List<java.util.List<java.lang.String>> getItemsets()
        Get the list of itemsets in this sequence
        Returns:
        A list of itemsets.
      • get

        public java.util.List<java.lang.String> get(int index)
        Get the itemset at a given position in this sequence
        Parameters:
        index - the position
        Returns:
        the itemset as a list of strings.
      • size

        public int size()
        Get the size of this sequence (number of itemsets).
        Returns:
        the size (an integer).
      • cloneSequenceMinusItems

        public Sequence cloneSequenceMinusItems(java.util.Map<java.lang.String,java.util.Set<java.lang.Integer>> mapSequenceID,
                                                double relativeMinSup)
        Make a copy of this sequence while removing some items that are infrequent with respect to a threshold minsup.
        Parameters:
        mapSequenceID - a map with key = item value = a set of sequence ids containing this item
        relativeMinSup - the minimum support threshold chosen by the user.
        Returns:
        a copy of this sequence except that item(s) with a support lower than minsup have been excluded.
      • cloneItemsetMinusItems

        public java.util.List<java.lang.String> cloneItemsetMinusItems(java.util.List<java.lang.String> itemset,
                                                                       java.util.Map<java.lang.String,java.util.Set<java.lang.Integer>> mapSequenceID,
                                                                       double relativeMinsup)
        Make a copy of an itemset while removing some items that are infrequent with respect to a threshold minsup.
        Parameters:
        mapSequenceID - a map with key = item value = a set of sequence ids containing this item
        relativeMinsup - the minimum support threshold chosen by the user.
        Returns:
        a copy of this itemset except that item(s) with a support lower than minsup have been excluded.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.