Documentation of 'ca.pfv.spmf.algorithms.sequential_rules.cmrules.Rule' Java class
Rule
ca.pfv.spmf.algorithms.sequential_rules.cmrules

Class Rule



  • public class Rule
    extends java.lang.Object
    This class represent a rule as found by the CMRules algorithm (an association rules as in Phase 1 of CMRules or a sequential rule as in phase 2 of CMRules. This class is specially designed for CMRules. It contains the "transactionCount" which is the support as defined in association rule mining, plus the "sequentialTransactionCount" which is the support as defined in sequential rule mining. Besides, each itemset (antecedent and consequent) carry their corresponding transaction ID lists (this is necessary for phase 2 of the CMRules algorithm).
    See Also:
    AlgoCMRules, Rules, Itemset
    • Constructor Detail

      • Rule

        public Rule(Itemset itemset1,
                    Itemset itemset2,
                    int transactionCount,
                    double confidence)
        Constructor
        Parameters:
        itemset1 - antecedent itemset
        itemset2 - consequent itemset
        transactionCount - association support
        confidence - confidence
      • Rule

        public Rule(Rule rule)
        Constructor by making a copy of a rule.
        Parameters:
        rule - a rule
    • Method Detail

      • getItemset1

        public Itemset getItemset1()
        Get the rule antecedent
        Returns:
        an Itemset
      • getItemset2

        public Itemset getItemset2()
        Get the rule consequent
        Returns:
        an Itemset
      • getRelativeSupport

        public double getRelativeSupport(int objectCount)
        Get relative association support of this rule.
        Parameters:
        objectCount - the database size.
        Returns:
        a double value
      • getAbsoluteSupport

        public int getAbsoluteSupport()
        Get the association support of this rule as a int.
        Returns:
        a int value.
      • getConfidence

        public double getConfidence()
        Get the confidence.
        Returns:
        confidence as a double value.
      • print

        public void print()
        Print the itemset to System.out.
      • toString

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

        public int getSequentialAbsoluteSeqSupport()
        Get the sequential support of this rule.
        Returns:
        a int value.
      • getSequentialSupport

        public double getSequentialSupport(int objectCount)
        Get the sequential support of this rule as a double, relative value.
        Returns:
        a double value.
      • getSequentialConfidence

        public double getSequentialConfidence()
        Get the sequential confidence of this rule.
        Returns:
        a doule value.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.