Documentation of 'ca.pfv.spmf.patterns.rule_itemset_array_integer_with_count.Rule' Java class
Rule
ca.pfv.spmf.patterns.rule_itemset_array_integer_with_count

Class Rule

  • Direct Known Subclasses:
    AssocRule


    public class Rule
    extends java.lang.Object
    This class represent an association rule, where itemsets are arrays of integers.
    See Also:
    Itemset, Rules
    • Constructor Summary

      Constructors 
      Constructor and Description
      Rule(int[] itemset1, int[] itemset2, int coverage, int transactionCount, double confidence)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int getAbsoluteSupport()
      Get the absolute support of this rule (integer).
      double getConfidence()
      Get the confidence of this rule.
      int getCoverage()
      Get the coverage of the rule (the support of the rule antecedent) as a number of transactions
      int[] getItemset1()
      Get the left itemset of this rule (antecedent).
      int[] getItemset2()
      Get the right itemset of this rule (consequent).
      double getRelativeSupport(int databaseSize)
      Get the relative support of the rule (percentage)
      void print()
      Print this rule to System.out.
      java.lang.String toString()
      Return a String representation of this rule
      • Methods inherited from class java.lang.Object

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

      • Rule

        public Rule(int[] itemset1,
                    int[] itemset2,
                    int coverage,
                    int transactionCount,
                    double confidence)
        Constructor
        Parameters:
        itemset1 - the antecedent of the rule (an itemset)
        itemset2 - the consequent of the rule (an itemset)
        coverage - the support of the antecedent as a number of transactions
        transactionCount - the absolute support of the rule (integer - a number of transactions)
        confidence - the confidence of the rule
    • Method Detail

      • getRelativeSupport

        public double getRelativeSupport(int databaseSize)
        Get the relative support of the rule (percentage)
        Parameters:
        databaseSize - the number of transactions in the database where this rule was found.
        Returns:
        the support (double)
      • getAbsoluteSupport

        public int getAbsoluteSupport()
        Get the absolute support of this rule (integer).
        Returns:
        the absolute support.
      • getConfidence

        public double getConfidence()
        Get the confidence of this rule.
        Returns:
        the confidence
      • getCoverage

        public int getCoverage()
        Get the coverage of the rule (the support of the rule antecedent) as a number of transactions
        Returns:
        the coverage (int)
      • print

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

        public java.lang.String toString()
        Return a String representation of this rule
        Overrides:
        toString in class java.lang.Object
        Returns:
        a String
      • getItemset1

        public int[] getItemset1()
        Get the left itemset of this rule (antecedent).
        Returns:
        an itemset.
      • getItemset2

        public int[] getItemset2()
        Get the right itemset of this rule (consequent).
        Returns:
        an itemset.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.