Documentation of 'ca.pfv.spmf.algorithms.sequentialpatterns.fournier2008_seqdim.multidimensionalpatterns.MDPattern' Java class
MDPattern
ca.pfv.spmf.algorithms.sequentialpatterns.fournier2008_seqdim.multidimensionalpatterns

Class MDPattern



  • public class MDPattern
    extends java.lang.Object
    Implementation of an MD-Pattern as used by the DIM algorithm proposed by Helen Pinto et al. (2001).
    See Also:
    AlgoDim, MDPatterns, MDPatternsDatabase
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int WILDCARD
      a code representing the special value "*" that can be found in md-patterns
    • Constructor Summary

      Constructors 
      Constructor and Description
      MDPattern(int id)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addInteger(int value)
      Add a dimension value to this pattern.
      void addIntegerFirstPosition(int value)
      Add a dimension value to this pattern in first position.
      void addWildCard()
      Add a wildcard as dimension value to this md-pattern.
      void addWildCardFirstPosition()
      Add a wildcard (*) to this pattern in first position.
      java.lang.Integer get(int index)
      Get the value for the i-th dimension as an Integer.
      int getAbsoluteSupport()
      Get the support of this MD-Pattern as a int value.
      int getId()
      Get the ID of this pattern.
      java.util.Set<java.lang.Integer> getPatternsID()
      Get the set of patterns ID containing this pattern.
      double getRelativeSupport(int databaseSize)
      Get the relative support of this pattern (a double value)
      java.lang.String getRelativeSupportFormatted(int databaseSize)
      Get the relative support of this pattern as a percentage with two decimals (string)
      int getValue(int index)
      Get the value for the i-th dimension as a int.
      void print()
      Print this MD-pattern to System.out.
      void set(int indexDimension, int newValue)
      Change the dimension value for a given dimension to a given value.
      void setID(int id2)
      Set the ID of this pattern.
      void setPatternsIDList(java.util.Set<java.lang.Integer> patternsID)
      Set the set of patterns ID containing this pattern.
      int size()
      Get the size of this pattern.
      int strictlyContains(MDPattern mdpattern2)
      This method check if this MD-pattern strictly contains a given MD-pattern.
      java.lang.String toString()
      Get a string representation of this MD-Pattern.
      java.lang.String toStringShort()
      Get an abbreviated string representation of this MD-Pattern.
      • Methods inherited from class java.lang.Object

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

      • WILDCARD

        public static final int WILDCARD
        a code representing the special value "*" that can be found in md-patterns
        See Also:
        Constant Field Values
    • Constructor Detail

      • MDPattern

        public MDPattern(int id)
        Constructor.
        Parameters:
        id - an ID that should be given to this pattern.
    • Method Detail

      • getId

        public int getId()
        Get the ID of this pattern.
        Returns:
        an integer.
      • size

        public int size()
        Get the size of this pattern.
        Returns:
        the size as an integer.
      • getValue

        public int getValue(int index)
        Get the value for the i-th dimension as a int.
        Parameters:
        index - the position i.
        Returns:
        the value.
      • get

        public java.lang.Integer get(int index)
        Get the value for the i-th dimension as an Integer.
        Parameters:
        index - the position i.
        Returns:
        the value.
      • addInteger

        public void addInteger(int value)
        Add a dimension value to this pattern.
        Parameters:
        value - the dimension value (integer)
      • addWildCard

        public void addWildCard()
        Add a wildcard as dimension value to this md-pattern.
      • addIntegerFirstPosition

        public void addIntegerFirstPosition(int value)
        Add a dimension value to this pattern in first position.
        Parameters:
        value - the dimension value (int)
      • addWildCardFirstPosition

        public void addWildCardFirstPosition()
        Add a wildcard (*) to this pattern in first position.
      • getRelativeSupport

        public double getRelativeSupport(int databaseSize)
        Get the relative support of this pattern (a double value)
        Parameters:
        databaseSize - the database size
        Returns:
        the relative support
      • getAbsoluteSupport

        public int getAbsoluteSupport()
        Get the support of this MD-Pattern as a int value.
        Returns:
        the support
      • getRelativeSupportFormatted

        public java.lang.String getRelativeSupportFormatted(int databaseSize)
        Get the relative support of this pattern as a percentage with two decimals (string)
        Parameters:
        databaseSize - the database size
        Returns:
        the relative support as a string
      • print

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

        public java.lang.String toString()
        Get a string representation of this MD-Pattern.
        Overrides:
        toString in class java.lang.Object
      • toStringShort

        public java.lang.String toStringShort()
        Get an abbreviated string representation of this MD-Pattern.
      • getPatternsID

        public java.util.Set<java.lang.Integer> getPatternsID()
        Get the set of patterns ID containing this pattern.
        Returns:
        a set of patterns ID
      • setPatternsIDList

        public void setPatternsIDList(java.util.Set<java.lang.Integer> patternsID)
        Set the set of patterns ID containing this pattern.
        Parameters:
        patternsID - a set of patterns ID
      • strictlyContains

        public int strictlyContains(MDPattern mdpattern2)
        This method check if this MD-pattern strictly contains a given MD-pattern. Note that this method is only good for patterns having the same size.
        Parameters:
        mdpattern2 - the given MD-pattern.
        Returns:
        Return 1 if this mdpattern STRICTLY contains mdpattern2 *AND HAVE THE SAME SUPPORT* Return 2 if this mdpattern is exactly the same as mdpattern2 *AND HAVE THE SAME SUPPORT* Return 0 if this mdpattern does not contains mdpattern2.
      • set

        public void set(int indexDimension,
                        int newValue)
        Change the dimension value for a given dimension to a given value.
        Parameters:
        indexDimension - the position of the dimension.
        newValue - the new value
      • setID

        public void setID(int id2)
        Set the ID of this pattern.
        Parameters:
        id2 - the ID.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.