Documentation of 'ca.pfv.spmf.algorithms.associationrules.agrawal94_association_rules.AssocRules' Java class
AssocRules
ca.pfv.spmf.algorithms.associationrules.agrawal94_association_rules

Class AssocRules



  • public class AssocRules
    extends java.lang.Object
    This class represents a list of association rules found by the Agrawal algorithm for association rule mining. It is used for storing the rules found by the algorithm, when the user choose to keep the result into memory rather than saving it to a file.
    See Also:
    AlgoAgrawalFaster94, AssocRule
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      java.util.List<AssocRule> rules 
    • Constructor Summary

      Constructors 
      Constructor and Description
      AssocRules(java.lang.String name)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addRule(AssocRule rule)
      Add a rule to this list of rules
      java.util.List<AssocRule> getRules()
      Get the list of rules.
      int getRulesCount()
      Get the number of rules in this list of rules
      void printRules(int databaseSize)
      Print all the rules in this list to System.out.
      void printRulesWithLift(int databaseSize)
      Print all the rules in this list to System.out, and include information about the lift measure.
      void sortByConfidence()
      Sort the rules by confidence
      java.lang.String toString(int databaseSize)
      Return a string representation of this list of rules
      • Methods inherited from class java.lang.Object

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

      • rules

        public final java.util.List<AssocRule> rules
    • Constructor Detail

      • AssocRules

        public AssocRules(java.lang.String name)
        Constructor
        Parameters:
        name - a name for this list of association rules (string)
    • Method Detail

      • sortByConfidence

        public void sortByConfidence()
        Sort the rules by confidence
      • printRules

        public void printRules(int databaseSize)
        Print all the rules in this list to System.out.
        Parameters:
        databaseSize - the number of transactions in the transaction database where the rules were found
      • printRulesWithLift

        public void printRulesWithLift(int databaseSize)
        Print all the rules in this list to System.out, and include information about the lift measure.
        Parameters:
        databaseSize - the number of transactions in the transaction database where the rules were found
      • toString

        public java.lang.String toString(int databaseSize)
        Return a string representation of this list of rules
        Parameters:
        databaseSize - the number of transactions in the database where the rules were found.
        Returns:
        a string
      • addRule

        public void addRule(AssocRule rule)
        Add a rule to this list of rules
        Parameters:
        rule - the rule to be added
      • getRulesCount

        public int getRulesCount()
        Get the number of rules in this list of rules
        Returns:
        the number of rules
      • getRules

        public java.util.List<AssocRule> getRules()
        Get the list of rules.
        Returns:
        a list of rules.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.