|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.associations.AssociationRule
weka.associations.DefaultAssociationRule
public class DefaultAssociationRule
Class for storing and manipulating an association rule.
| Nested Class Summary | |
|---|---|
static class |
DefaultAssociationRule.METRIC_TYPE
Enum for holding different metric types |
| Field Summary | |
|---|---|
static Tag[] |
TAGS_SELECTION
Tags for display in the GUI |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class weka.associations.AssociationRule |
|---|
compareTo, containsItems, equals |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Tag[] TAGS_SELECTION
| Constructor Detail |
|---|
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 data| Method Detail |
|---|
public Collection<Item> getPremise()
AssociationRule
getPremise in class AssociationRulepublic Collection<Item> getConsequence()
AssociationRule
getConsequence in class AssociationRulepublic String getPrimaryMetricName()
AssociationRule
getPrimaryMetricName in class AssociationRulepublic double getPrimaryMetricValue()
AssociationRule
getPrimaryMetricValue in class AssociationRule
public double getNamedMetricValue(String metricName)
throws Exception
AssociationRule
getNamedMetricValue in class AssociationRulemetricName - the metric to get the value for
Exception - if the requested metric is unknown for this rulepublic int getNumberOfMetricsForRule()
AssociationRule
getNumberOfMetricsForRule in class AssociationRulepublic String[] getMetricNamesForRule()
AssociationRule
getMetricNamesForRule in class AssociationRule
public double[] getMetricValuesForRule()
throws Exception
AssociationRule
getMetricValuesForRule in class AssociationRuleException - if a metric can't be computed for some reason.public int getPremiseSupport()
AssociationRule
getPremiseSupport in class AssociationRulepublic int getConsequenceSupport()
AssociationRule
getConsequenceSupport in class AssociationRulepublic int getTotalSupport()
AssociationRule
getTotalSupport in class AssociationRulepublic int getTotalTransactions()
AssociationRule
getTotalTransactions in class AssociationRulepublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||