类 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
- 另请参阅:
-
嵌套类概要
嵌套类修饰符和类型类说明static enum
Enum for holding different metric types -
字段概要
字段 -
构造器概要
构造器构造器说明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. -
方法概要
修饰符和类型方法说明int
Compare this rule to the supplied rule.boolean
containsItems
(ArrayList<Attribute> items, boolean useOr) boolean
Return true if this rule is equal to the supplied one.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.Get the consequence of this rule.int
Get the support for the consequence.Get the metric type of this rule (e.g.double
Get the value of the metric for this rule.Get the premise of this rule.int
Get the support for the premise.int
Get the total support for this rule (premise + consequence).int
Get the total number of transactions in the data.static List<FPGrowth.AssociationRule>
pruneRules
(List<FPGrowth.AssociationRule> rulesToPrune, ArrayList<Attribute> itemsToConsider, boolean useOr) toString()
Get a textual description of this rule.toXML()
-
字段详细资料
-
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 ruleconsequence
- the consequence of the rulemetric
- the metric for the rulepremiseSupport
- the support of the premiseconsequenceSupport
- the support of the consequencetotalSupport
- the total support of the ruletotalTransactions
- the number of transactions in the data
-
-
方法详细资料
-
getPremise
Get the premise of this rule.- 返回:
- the premise of this rule.
-
getConsequence
Get the consequence of this rule.- 返回:
- the consequence of this rule.
-
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
Compare this rule to the supplied rule.- 指定者:
compareTo
在接口中Comparable<FPGrowth.AssociationRule>
- 参数:
other
- the rule to compare to.- 返回:
- the result of the comparison.
-
equals
Return true if this rule is equal to the supplied one. -
containsItems
-
toString
Get a textual description of this rule. -
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 setsmetricToUse
- the metric to usemetricThreshold
- the threshold value that a rule must meetupperBoundMinSuppAsInstances
- the upper bound on the support in order to accept the rulelowerBoundMinSuppAsInstances
- the lower bound on the support in order to accept the ruletotalTransactions
- 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)
-