textclassifier.mining
Class largeItemset

java.lang.Object
  extended by textclassifier.mining.largeItemset

public class largeItemset
extends java.lang.Object

Class representing a frequent itemset used to obtain association rules


Constructor Summary
largeItemset()
          Constructor of the class (only initialization)
largeItemset(java.util.HashSet<fitem> fitems, double support)
          Constructor of the class (with set of items and support)
largeItemset(java.util.HashSet<fitem> fitems, int abs_supp)
          Constructor of the class (with set of items and absolute support)
 
Method Summary
 void addCategory(Category cat)
          Adds a new category into the set of categories associated with the itemset
 void addItem(fitem id)
          Adds item to the itemset
 int getAbsSupp()
          Returns absolute support of frequent itemset
 java.util.HashSet<java.lang.Integer> getAttNames()
          Gets a set of attribute names which correspond to the items of itemset
 java.util.HashSet<fitem> getItemSet()
          Returns a set of items
 java.lang.String getSqlCondition()
          Returns an SQL condition for WHERE clause corresponding to the content of itemset
 double getSupport()
          Returns the support of frequent itemset
 boolean hasAtt(java.lang.String att_name)
          Finds out, if some of the items contains given attribute
 boolean hasSameAtts(largeItemset lrg2)
          Tests if an itemset has the same set of attributes in items as the second itemset
 void setAbsSupp(int supp)
          Sets the absolute support value of the itemset
 void setItemSet(java.util.HashSet<fitem> itemset)
          Sets itemset as itemset of LargeItemset object
 void setSupport(double supp)
          Sets the support value of the itemset
 int size()
          Returns size of the itemset
 java.lang.String toShortString()
          Converts information about frequent itemset into a shorter string
 java.lang.String toString()
          Converts information about frequent itemset into a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

largeItemset

public largeItemset()
Constructor of the class (only initialization)


largeItemset

public largeItemset(java.util.HashSet<fitem> fitems,
                    int abs_supp)
Constructor of the class (with set of items and absolute support)

Parameters:
fitems - a set of items
abs_supp - absolute support

largeItemset

public largeItemset(java.util.HashSet<fitem> fitems,
                    double support)
Constructor of the class (with set of items and support)

Parameters:
fitems - a set of items
support - support
Method Detail

hasAtt

public boolean hasAtt(java.lang.String att_name)
Finds out, if some of the items contains given attribute

Parameters:
att_name - name of the attribute
Returns:
boolean value, if an attribute is found, the result is true

getItemSet

public java.util.HashSet<fitem> getItemSet()
Returns a set of items

Returns:
itemset (ArrayList of items IDs)

setItemSet

public void setItemSet(java.util.HashSet<fitem> itemset)
Sets itemset as itemset of LargeItemset object

Parameters:
itemset - itemset(ArrayList of integers)

addItem

public void addItem(fitem id)
Adds item to the itemset

Parameters:
id - ID of item, that will be added to the itemset

size

public int size()
Returns size of the itemset

Returns:
size (integer) of the itemset

addCategory

public void addCategory(Category cat)
Adds a new category into the set of categories associated with the itemset

Parameters:
cat - added category

getAbsSupp

public int getAbsSupp()
Returns absolute support of frequent itemset

Returns:
numeric value (integer)

getSupport

public double getSupport()
Returns the support of frequent itemset

Returns:
numeric value (double)

setAbsSupp

public void setAbsSupp(int supp)
Sets the absolute support value of the itemset

Parameters:
supp - value of absolute support

setSupport

public void setSupport(double supp)
Sets the support value of the itemset

Parameters:
supp - value of support

toString

public java.lang.String toString()
Converts information about frequent itemset into a string

Overrides:
toString in class java.lang.Object
Returns:
string with informations about frequent itemset

toShortString

public java.lang.String toShortString()
Converts information about frequent itemset into a shorter string

Returns:
string (shorter version) with informations about frequent itemset

getSqlCondition

public java.lang.String getSqlCondition()
Returns an SQL condition for WHERE clause corresponding to the content of itemset

Returns:
string with SQL condition

getAttNames

public java.util.HashSet<java.lang.Integer> getAttNames()
Gets a set of attribute names which correspond to the items of itemset

Returns:
set of attributes

hasSameAtts

public boolean hasSameAtts(largeItemset lrg2)
Tests if an itemset has the same set of attributes in items as the second itemset

Returns:
boolean value, returns true, if the attributes are equal