public class DefaultAssociationRule extends AssociationRule implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultAssociationRule.METRIC_TYPE
Enum for holding different metric types
|
| Modifier and Type | Field and Description |
|---|---|
static Tag[] |
TAGS_SELECTION
Tags for display in the GUI
|
| Constructor and Description |
|---|
DefaultAssociationRule(Collection<Item> premise,
Collection<Item> consequence,
DefaultAssociationRule.METRIC_TYPE metric,
int premiseSupport,
int consequenceSupport,
int totalSupport,
int totalTransactions)
Construct a new default association rule.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<Item> |
getConsequence()
Get the consequence of this rule.
|
int |
getConsequenceSupport()
Get the support for the consequence.
|
String[] |
getMetricNamesForRule()
Return the names of the metrics available for this rule.
|
double[] |
getMetricValuesForRule()
Get all the available metric values for this rule.
|
double |
getNamedMetricValue(String metricName)
Get the value of the named metric for this rule
|
int |
getNumberOfMetricsForRule()
Gets the number of metrics available for this rule.
|
Collection<Item> |
getPremise()
Get the premise of this rule.
|
int |
getPremiseSupport()
Get the support for the premise.
|
String |
getPrimaryMetricName()
Get the name of the primary metric of this rule (e.g.
|
double |
getPrimaryMetricValue()
Get the value of the metric for this rule.
|
int |
getTotalSupport()
Get the total support for this rule (premise + consequence).
|
int |
getTotalTransactions()
Get the total number of transactions in the data.
|
String |
toString()
Get a textual description of this rule.
|
compareTo, containsItems, equalspublic static final Tag[] TAGS_SELECTION
public DefaultAssociationRule(Collection<Item> premise, Collection<Item> consequence, DefaultAssociationRule.METRIC_TYPE metric, int premiseSupport, int consequenceSupport, int totalSupport, int totalTransactions)
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 datapublic Collection<Item> getPremise()
AssociationRulegetPremise in class AssociationRulepublic Collection<Item> getConsequence()
AssociationRulegetConsequence in class AssociationRulepublic String getPrimaryMetricName()
AssociationRulegetPrimaryMetricName in class AssociationRulepublic double getPrimaryMetricValue()
AssociationRulegetPrimaryMetricValue in class AssociationRulepublic double getNamedMetricValue(String metricName) throws Exception
AssociationRulegetNamedMetricValue in class AssociationRulemetricName - the metric to get the value forException - if the requested metric is unknown for this rulepublic int getNumberOfMetricsForRule()
AssociationRulegetNumberOfMetricsForRule in class AssociationRulepublic String[] getMetricNamesForRule()
AssociationRulegetMetricNamesForRule in class AssociationRulepublic double[] getMetricValuesForRule()
throws Exception
AssociationRulegetMetricValuesForRule in class AssociationRuleException - if a metric can't be computed for some reason.public int getPremiseSupport()
AssociationRulegetPremiseSupport in class AssociationRulepublic int getConsequenceSupport()
AssociationRulegetConsequenceSupport in class AssociationRulepublic int getTotalSupport()
AssociationRulegetTotalSupport in class AssociationRulepublic int getTotalTransactions()
AssociationRulegetTotalTransactions in class AssociationRuleCopyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.