Documentation of 'ca.pfv.spmf.algorithms.sequentialpatterns.clospan_AGP.items.Sequence' Java class
Sequence
ca.pfv.spmf.algorithms.sequentialpatterns.clospan_AGP.items

Class Sequence



  • public class Sequence
    extends java.lang.Object
    Inspired in SPMF Implementation of a sequence. A sequence is defined as a list of itemsets and can have an identifier. 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 .
    • Constructor Summary

      Constructors 
      Constructor and Description
      Sequence(int id)
      Standard constructor for a sequence
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addItem(int indexItemset, int indexItem, Item item)
      It adds an item in the specified item position of the specified itemset of the sequence
      void addItem(int indexItemset, Item item)
      It adds an item in the specified itemset of the sequence
      void addItem(Item item)
      It adds an item to the last itemset of the sequence
      void addItemset(Itemset itemset)
      It adds an itemset in the last position of the sequence
      Sequence cloneSequence()
      It clones a sequence
      Sequence cloneSequenceMinusItems(java.util.Map<Item,java.util.BitSet> mapSequenceID, double relativeMinSup)
      It clones a sequence without copying the non-frequent items
      Itemset get(int index)
      It gets a particular itemset from the sequence
      int getId()
      It returns the sequence ID
      java.util.List<Itemset> getItemsets()
      It gets the list of itemsets in this sequence.
      long getTimeLength()
      It returns the time length of the sequence, i.e.
      int length()
      It returns the number of items that the sequence has
      Itemset remove(int indexItemset)
      It removes the specified itemset from the sequence
      Item remove(int indexItemset, int indexItem)
      It removes the specified item from the specified itemset in the sequence
      void remove(int indexItemset, Item item)
      It removes the specified item from the specified itemset in the sequence
      void setID(int id)
      Sequence ID setter
      int size()
      It returns the number of itemsets that the sequence has
      java.lang.String toString()
      Get 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)
        Standard constructor for a sequence
        Parameters:
        id - The sequence identifier
    • Method Detail

      • addItemset

        public void addItemset(Itemset itemset)
        It adds an itemset in the last position of the sequence
        Parameters:
        itemset - the itemset to add
      • addItem

        public void addItem(Item item)
        It adds an item to the last itemset of the sequence
        Parameters:
        item - the item to add
      • addItem

        public void addItem(int indexItemset,
                            Item item)
        It adds an item in the specified itemset of the sequence
        Parameters:
        indexItemset - Itemset index where we want to insert the item
        item - The item that we want to insert
      • addItem

        public void addItem(int indexItemset,
                            int indexItem,
                            Item item)
        It adds an item in the specified item position of the specified itemset of the sequence
        Parameters:
        indexItemset - Itemset index where we want to insert the item
        indexItem - Item index where we want to insert the item
        item - The item that we want to insert
      • remove

        public Itemset remove(int indexItemset)
        It removes the specified itemset from the sequence
        Parameters:
        indexItemset - Itemset index of itemset that we want to remove
        Returns:
        the itemset that was rmoved
      • remove

        public Item remove(int indexItemset,
                           int indexItem)
        It removes the specified item from the specified itemset in the sequence
        Parameters:
        indexItemset - Itemset index from where we want to remove the item
        indexItem - Item index that we want to remove
        Returns:
        the item that was removed
      • remove

        public void remove(int indexItemset,
                           Item item)
        It removes the specified item from the specified itemset in the sequence
        Parameters:
        indexItemset - Itemset index from where we want to remove the item
        item - Item that we want to remove
      • cloneSequence

        public Sequence cloneSequence()
        It clones a sequence
        Returns:
        the clone sequence
      • toString

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

        public int getId()
        It returns the sequence ID
        Returns:
        the sequence ID
      • getItemsets

        public java.util.List<Itemset> getItemsets()
        It gets the list of itemsets in this sequence.
        Returns:
        the list of itemsets
      • get

        public Itemset get(int index)
        It gets a particular itemset from the sequence
        Parameters:
        index - The itemset index in which we are interested in
        Returns:
        the itemset
      • size

        public int size()
        It returns the number of itemsets that the sequence has
        Returns:
        the size (int)
      • length

        public int length()
        It returns the number of items that the sequence has
        Returns:
        the number of items
      • getTimeLength

        public long getTimeLength()
        It returns the time length of the sequence, i.e. the timestamp of the last itemset minus the timestamp of the first itemset
        Returns:
        the time length (long)
      • cloneSequenceMinusItems

        public Sequence cloneSequenceMinusItems(java.util.Map<Item,java.util.BitSet> mapSequenceID,
                                                double relativeMinSup)
        It clones a sequence without copying the non-frequent items
        Parameters:
        mapSequenceID - Association between an item and their appearances in the database
        relativeMinSup - Minimum relative support
        Returns:
        the clone
      • setID

        public void setID(int id)
        Sequence ID setter
        Parameters:
        id -

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.