textclassifier.mining
Class AssociationRule

java.lang.Object
  extended by textclassifier.mining.AssociationRule
All Implemented Interfaces:
java.lang.Comparable

public class AssociationRule
extends java.lang.Object
implements java.lang.Comparable

Class representing an association rule used for classifivation (Items => Category)


Constructor Summary
AssociationRule(largeItemset antecendent, Category consequecent, float support, double confidence)
          Constructor of the class
 
Method Summary
 int compareTo(java.lang.Object o)
          Compares an association rule with other association rule, which is more general
 largeItemset getAntecendent()
          Returns a set of items contained on the left hand side of a rule
 double getConfidence()
          Returns a value of confidence of an assocation rule
 Category getConsequecent()
          Returns a category contained on the right hand side of a rule
 double getSupport()
          Returns a value of support of an assocation rule
 java.lang.String toString()
          Converts information about association rule into a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AssociationRule

public AssociationRule(largeItemset antecendent,
                       Category consequecent,
                       float support,
                       double confidence)
Constructor of the class

Parameters:
antecendent - antecedent of a rule (set of items)
consequecent - consequent of a rule (category)
support - support of a rule
confidence - confidence of a rule
Method Detail

getAntecendent

public largeItemset getAntecendent()
Returns a set of items contained on the left hand side of a rule

Returns:
an itemset of values in antecedent

getConsequecent

public Category getConsequecent()
Returns a category contained on the right hand side of a rule

Returns:
category of the rule

getSupport

public double getSupport()
Returns a value of support of an assocation rule

Returns:
a double value of support

getConfidence

public double getConfidence()
Returns a value of confidence of an assocation rule

Returns:
a double value of confidence

toString

public java.lang.String toString()
Converts information about association rule into a string

Overrides:
toString in class java.lang.Object
Returns:
string with informations about assocation rule

compareTo

public int compareTo(java.lang.Object o)
              throws java.lang.ClassCastException
Compares an association rule with other association rule, which is more general

Specified by:
compareTo in interface java.lang.Comparable
Returns:
value 1 if the first is more general, -1 otherwise
Throws:
java.lang.ClassCastException