类 FPGrowth.AssociationRule

java.lang.Object
weka.associations.FPGrowth.AssociationRule
所有已实现的接口:
Serializable, Comparable<FPGrowth.AssociationRule>
封闭类:
FPGrowth

public static class FPGrowth.AssociationRule extends Object implements Serializable, Comparable<FPGrowth.AssociationRule>
作者:
mhall
另请参阅:
  • 字段详细资料

    • TAGS_SELECTION

      public static final Tag[] TAGS_SELECTION
      Tags for display in the GUI
  • 构造器详细资料

    • AssociationRule

      public AssociationRule(Collection<FPGrowth.BinaryItem> premise, Collection<FPGrowth.BinaryItem> consequence, FPGrowth.AssociationRule.METRIC_TYPE metric, int premiseSupport, int consequenceSupport, int totalSupport, int totalTransactions)
      Construct a new association rule.
      参数:
      premise - the premise of the rule
      consequence - the consequence of the rule
      metric - the metric for the rule
      premiseSupport - the support of the premise
      consequenceSupport - the support of the consequence
      totalSupport - the total support of the rule
      totalTransactions - the number of transactions in the data
  • 方法详细资料

    • getPremise

      public Collection<FPGrowth.BinaryItem> getPremise()
      Get the premise of this rule.
      返回:
      the premise of this rule.
    • getConsequence

      public Collection<FPGrowth.BinaryItem> getConsequence()
      Get the consequence of this rule.
      返回:
      the consequence of this rule.
    • getMetricType

      public FPGrowth.AssociationRule.METRIC_TYPE getMetricType()
      Get the metric type of this rule (e.g. confidence).
      返回:
      the metric type of this rule.
    • getMetricValue

      public double getMetricValue()
      Get the value of the metric for this rule.
      返回:
      the value of the metric for this rule.
    • getPremiseSupport

      public int getPremiseSupport()
      Get the support for the premise.
      返回:
      the support for the premise.
    • getConsequenceSupport

      public int getConsequenceSupport()
      Get the support for the consequence.
      返回:
      the support for the consequence.
    • getTotalSupport

      public int getTotalSupport()
      Get the total support for this rule (premise + consequence).
      返回:
      the total support for this rule.
    • getTotalTransactions

      public int getTotalTransactions()
      Get the total number of transactions in the data.
      返回:
      the total number of transactions in the data.
    • compareTo

      public int compareTo(FPGrowth.AssociationRule other)
      Compare this rule to the supplied rule.
      指定者:
      compareTo 在接口中 Comparable<FPGrowth.AssociationRule>
      参数:
      other - the rule to compare to.
      返回:
      the result of the comparison.
    • equals

      public boolean equals(Object other)
      Return true if this rule is equal to the supplied one.
      覆盖:
      equals 在类中 Object
      返回:
      true if this rule is the same as the supplied rule.
    • containsItems

      public boolean containsItems(ArrayList<Attribute> items, boolean useOr)
    • toString

      public String toString()
      Get a textual description of this rule.
      覆盖:
      toString 在类中 Object
      返回:
      a textual description of this rule.
    • toXML

      public String toXML()
    • generateRulesBruteForce

      public static List<FPGrowth.AssociationRule> generateRulesBruteForce(weka.associations.FPGrowth.FrequentItemSets largeItemSets, FPGrowth.AssociationRule.METRIC_TYPE metricToUse, double metricThreshold, int upperBoundMinSuppAsInstances, int lowerBoundMinSuppAsInstances, int totalTransactions)
      Generate all association rules, from the supplied frequet item sets, that meet a given minimum metric threshold. Uses a brute force approach.
      参数:
      largeItemSets - the set of frequent item sets
      metricToUse - the metric to use
      metricThreshold - the threshold value that a rule must meet
      upperBoundMinSuppAsInstances - the upper bound on the support in order to accept the rule
      lowerBoundMinSuppAsInstances - the lower bound on the support in order to accept the rule
      totalTransactions - the total number of transactions in the data
      返回:
      a list of association rules
    • pruneRules

      public static List<FPGrowth.AssociationRule> pruneRules(List<FPGrowth.AssociationRule> rulesToPrune, ArrayList<Attribute> itemsToConsider, boolean useOr)