public class DefaultAssociationRule extends AssociationRule implements java.io.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(java.util.Collection<Item> premise,
java.util.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 |
|---|---|
java.util.Collection<Item> |
getConsequence()
Get the consequence of this rule.
|
int |
getConsequenceSupport()
Get the support for the consequence.
|
java.lang.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(java.lang.String metricName)
Get the value of the named metric for this rule
|
int |
getNumberOfMetricsForRule()
Gets the number of metrics available for this rule.
|
java.util.Collection<Item> |
getPremise()
Get the premise of this rule.
|
int |
getPremiseSupport()
Get the support for the premise.
|
java.lang.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.
|
java.lang.String |
toString()
Get a textual description of this rule.
|
compareTo, containsItems, equalspublic static final Tag[] TAGS_SELECTION
public DefaultAssociationRule(java.util.Collection<Item> premise, java.util.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 java.util.Collection<Item> getPremise()
AssociationRulegetPremise in class AssociationRulepublic java.util.Collection<Item> getConsequence()
AssociationRulegetConsequence in class AssociationRulepublic java.lang.String getPrimaryMetricName()
AssociationRulegetPrimaryMetricName in class AssociationRulepublic double getPrimaryMetricValue()
AssociationRulegetPrimaryMetricValue in class AssociationRulepublic double getNamedMetricValue(java.lang.String metricName)
throws java.lang.Exception
AssociationRulegetNamedMetricValue in class AssociationRulemetricName - the metric to get the value forjava.lang.Exception - if the requested metric is unknown for this rulepublic int getNumberOfMetricsForRule()
AssociationRulegetNumberOfMetricsForRule in class AssociationRulepublic java.lang.String[] getMetricNamesForRule()
AssociationRulegetMetricNamesForRule in class AssociationRulepublic double[] getMetricValuesForRule()
throws java.lang.Exception
AssociationRulegetMetricValuesForRule in class AssociationRulejava.lang.Exception - 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 AssociationRulepublic java.lang.String toString()
toString in class java.lang.Object