Main Page | Class Hierarchy | Class List | Class Members

kddml.Core.DataMining.AssociationRules.AssociationModel Class Reference

Inheritance diagram for kddml.Core.DataMining.AssociationRules.AssociationModel:

kddml.Core.DataMining.MiningModel kddml.Core.DataMining.AssociationRules.AssociationModelManager kddml.Core.KDDMLObject kddml.Core.DataMining.MiningModelManager kddml.Core.DataMining.MiningModelManager kddml.Core.HTMLTranslator List of all members.

Public Member Functions

KDDMLObjectType getType ()
boolean addRule (AssociationRuleManager rule)
void addRules (AssociationRuleManager[] rules)
Iterator getAssociationRules ()
Iterator getItemsets ()
Iterator getItems ()
boolean removeRule (AssociationRuleManager rule, boolean rebuild_itemsets)
void removeRules (AssociationRuleManager[] rules, boolean rebuild_itemsets)
boolean removeItemset (ItemsetManager itemset)
void removeItemsets (ItemsetManager[] itemsets)
double getMinSupport ()
double getMinConfidence ()
int getNumberOfTransactions ()
int getNumberOfItems ()
int getNumberOfItemsets ()
int getNumberOfRules ()
Integer getMaxTransactionSize ()
void setMaxTransactionSize (int max_number_of_items_per_TA)
Double getAverageTransactionSize ()
void setAvgTransactionSize (double avg_number_of_items_per_TA)
boolean isBoolean ()
boolean isEmpty ()
boolean contains (ItemManager item)
boolean contains (ItemsetManager itemset)
boolean contains (AssociationRuleManager rule)
void saveToRepository () throws kddml.Core.KDDMLCoreException
AssociationModel clone (java.io.File output_path)
Object rdaToInstances () throws AssociationModelException
Object itemsetsToInstances () throws AssociationModelException
String toString ()
void saveHTML () throws KDDMLCoreException

Static Public Attributes

static int MAX_NUMBER_OF_ITEMSETS = 5000
static int MAX_NUMBER_OF_RULES = 5000

Detailed Description

Association rule mining finds interesting association or correlation relationships among a large set of data items. A typical example of association rule mining is market basket analysis that analyzes customer buying habits by finding association between the different items that customers place in their shopping baskets.
KDDML association model contains boolean association rules (or intra-attribute rules) that have the form:

spaghetti, tomato --> parmesan, or inter-attribute rules, such as

carType = racing, homeInsurance = false --> married = yes. An association rule model consists of four major parts:

  1. Model attributes (such as minimum support, minimum confidence, etc.).
  2. A list of items.
  3. A list of frequent itemsets.
  4. A list of association rules.
Items, itemsets and association rules are ordered using a precise criterium and this objects are stored in a TreeSet ordered structure. An AssociationModel can contain any number of itemsets and association rules.

Title: KDDML

Description: Knowledge Discovery in Database Environment

Copyright: Copyright (c) 2003-2005

Company: Universita' di Pisa - Dipartimento di Informatica

Author:
Andrea Romei (romei@di.unipi.it)
Version:
2.0.16


Member Function Documentation

KDDMLObjectType kddml.Core.DataMining.AssociationRules.AssociationModel.getType  )  [virtual]
 

It returns the type of the object.

Returns:
KDDMLObjectType

Implements kddml.Core.KDDMLObject.

boolean kddml.Core.DataMining.AssociationRules.AssociationModel.addRule AssociationRuleManager  rule  )  [virtual]
 

Adds a new association rule to this model. Returns true if the rule has been added. Returns false if the model already contains the rule.

Parameters:
rule AssociationRuleManager the association rule to add to the model.
Returns:
boolean true if the rule do not exist in the model, false otherwise.

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

void kddml.Core.DataMining.AssociationRules.AssociationModel.addRules AssociationRuleManager[]  rules  )  [virtual]
 

Adds a set of association rules to this model.

Parameters:
rules AssociationRuleManager[] a set of association rules to add to the model

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

Iterator kddml.Core.DataMining.AssociationRules.AssociationModel.getAssociationRules  )  [virtual]
 

Returns the list of association rules belonging to the model.

Returns:
Iterator the list of association rules.

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

Iterator kddml.Core.DataMining.AssociationRules.AssociationModel.getItemsets  )  [virtual]
 

Returns the list of itemsets belonging to the model.

Returns:
Iterator the list of itemsets.

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

Iterator kddml.Core.DataMining.AssociationRules.AssociationModel.getItems  )  [virtual]
 

Returns the list of items belonging to the model.

Returns:
Iterator the list of items.

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

boolean kddml.Core.DataMining.AssociationRules.AssociationModel.removeRule AssociationRuleManager  rule,
boolean  rebuild_itemsets
[virtual]
 

Remove a rule from the model. If rebuild_itemsets is true, then the frequent itemsets are computed from the new set of association rules. Otherwise, itemsets will not change. Returns true if and only if the rule has been removed from the model.

Parameters:
rule AssociationRuleManager the association rule to remove from the model.
rebuild_itemsets boolean if true computes the frequent itemsets from association rules.
Returns:
boolean false if the rule is not removed.

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

void kddml.Core.DataMining.AssociationRules.AssociationModel.removeRules AssociationRuleManager[]  rules,
boolean  rebuild_itemsets
[virtual]
 

Removes a set of association rules from the list of rules. If rebuild_itemsets is true, then the frequent itemsets are computed from the new set of association rules. Otherwise, itemsets will not change.

Parameters:
rules AssociationRuleManager[] a set of association rules to add to the model
rebuild_itemsets boolean

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

boolean kddml.Core.DataMining.AssociationRules.AssociationModel.removeItemset ItemsetManager  itemset  )  [virtual]
 

Removes a frequent itemset from the model. Also removes from the model the association rules referred by the itemset. Returns true if and only if the itemset has been removed from the model.

Parameters:
itemset ItemsetManager the itemset to be removed.
Returns:
boolean

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

void kddml.Core.DataMining.AssociationRules.AssociationModel.removeItemsets ItemsetManager[]  itemsets  )  [virtual]
 

Removes a set of frequent itemsets from the model. Also removes from the model the association rules referred by the itemsets.

Parameters:
itemsets ItemsetManager[] a list of itemsets.

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

double kddml.Core.DataMining.AssociationRules.AssociationModel.getMinSupport  )  [virtual]
 

Returns the minimum support of rules. Support is calculate as: (num supporting transactions / num total transactions).

Returns:
double

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

double kddml.Core.DataMining.AssociationRules.AssociationModel.getMinConfidence  )  [virtual]
 

Returns the minimum confidence of rules. Confidence is calculate as: (support(rule) / support(antecedent)).

Returns:
double

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

int kddml.Core.DataMining.AssociationRules.AssociationModel.getNumberOfTransactions  )  [virtual]
 

Returns the number of transactions used to build the model.

Returns:
int

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

int kddml.Core.DataMining.AssociationRules.AssociationModel.getNumberOfItems  )  [virtual]
 

Returns the number of items.

Returns:
int

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

int kddml.Core.DataMining.AssociationRules.AssociationModel.getNumberOfItemsets  )  [virtual]
 

Returns the number of itemsets.

Returns:
int

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

int kddml.Core.DataMining.AssociationRules.AssociationModel.getNumberOfRules  )  [virtual]
 

Returns the number of rules.

Returns:
int

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

Integer kddml.Core.DataMining.AssociationRules.AssociationModel.getMaxTransactionSize  )  [virtual]
 

Returns the maximum number of items in the transactions contained in the input data used to build the model.

Returns:
Integer

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

void kddml.Core.DataMining.AssociationRules.AssociationModel.setMaxTransactionSize int  max_number_of_items_per_TA  ) 
 

Sets the maximum number of items in the transactions contained in the input data used to build the model.

Parameters:
max_number_of_items_per_TA int

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

Double kddml.Core.DataMining.AssociationRules.AssociationModel.getAverageTransactionSize  )  [virtual]
 

Returns the average number of items in the transactions contained in the input data used to build the model.

Returns:
Double

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

void kddml.Core.DataMining.AssociationRules.AssociationModel.setAvgTransactionSize double  avg_number_of_items_per_TA  ) 
 

Sets the average number of items in the transactions contained in the input data used to build the model.

Parameters:
avg_number_of_items_per_TA double

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

boolean kddml.Core.DataMining.AssociationRules.AssociationModel.isBoolean  )  [virtual]
 

Returns true if the model contains boolean association rules. Boolean association rules (or intra-attribute rules) have the form:

spaghetti, tomato --> parmesan.
Returns false if the model contains inter-attribute rules, such as

carType = racing, homeInsurance = false --> married = yes.

Returns:
boolean true if the rules is an intra-attribute rules. False otherwise.

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

boolean kddml.Core.DataMining.AssociationRules.AssociationModel.isEmpty  )  [virtual]
 

Returns ture if the model do not contain frequent itemsets and association rules.

Returns:
boolean

Implements kddml.Core.KDDMLObject.

boolean kddml.Core.DataMining.AssociationRules.AssociationModel.contains ItemManager  item  ) 
 

Tests if the model contains at least an item.

Parameters:
item ItemManager
Returns:
boolean true if the model contains the item.

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

boolean kddml.Core.DataMining.AssociationRules.AssociationModel.contains ItemsetManager  itemset  )  [virtual]
 

Tests if the model contains an input itemset.

Parameters:
itemset ItemsetManager
Returns:
boolean true if the model contains the itemset.

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

boolean kddml.Core.DataMining.AssociationRules.AssociationModel.contains AssociationRuleManager  rule  )  [virtual]
 

Tests if the model contains an input association rule.

Parameters:
rule AssociationRuleManager
Returns:
boolean true if the model contains the association rule.

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

void kddml.Core.DataMining.AssociationRules.AssociationModel.saveToRepository  )  throws kddml.Core.KDDMLCoreException [virtual]
 

Save the object in the system repository. The destination path is provided by the object_path variable.

Exceptions:
KDDMLCoreException 

Implements kddml.Core.KDDMLObject.

AssociationModel kddml.Core.DataMining.AssociationRules.AssociationModel.clone java.io.File  output_path  ) 
 

Clones this model returning a new association model as output. Model Returned is a shallow copy of this one (The elements themselves (items, itemsets, association rules) are not cloned).

Parameters:
output_path File the path in the model system repository containing the cloned model
Returns:
AssociationModel

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

Object kddml.Core.DataMining.AssociationRules.AssociationModel.rdaToInstances  )  throws AssociationModelException [virtual]
 

Returns a representation of the rules contained in the model as set of instances. The number of instances is equal to the number of association rules. The list of attributes is reported below:

  1. the items of the body as string in comma separated format (attribute body);
  2. the items of the head as string in comma separated format (attribute head);
  3. the body cardinality (attribute body_cardinality);
  4. the head cardinality (attribute head_cardinality);
  5. the support of the rule (attribute support);
  6. the confidence of the rule (attribute confidence).

Returns:
Object
Exceptions:
AssociationModelException 

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

Object kddml.Core.DataMining.AssociationRules.AssociationModel.itemsetsToInstances  )  throws AssociationModelException [virtual]
 

Returns a representation of the itemsets contained in the model as set of instances. The number of instances is equal to the number of itemsets. The list of attributes is reported below:

  1. the items belonging to the itemset as string in comma separated format (attribute itemset);
  2. the itemset cardinalty (attribute itemset_cardinality);
  3. the itemset support (attribute itemset_support).

Returns:
Object
Exceptions:
AssociationModelException the set of instances as generic object.

Implements kddml.Core.DataMining.AssociationRules.AssociationModelManager.

String kddml.Core.DataMining.AssociationRules.AssociationModel.toString  ) 
 

Returns a representation of this object as string.

Returns:
String

Reimplemented from kddml.Core.DataMining.MiningModel.

void kddml.Core.DataMining.AssociationRules.AssociationModel.saveHTML  )  throws KDDMLCoreException [virtual]
 

Save the object in the system repository as HTML document.

Exceptions:
KDDMLCoreException 

Implements kddml.Core.HTMLTranslator.


Member Data Documentation

int kddml.Core.DataMining.AssociationRules.AssociationModel.MAX_NUMBER_OF_ITEMSETS = 5000 [static]
 

The max number of itemsets that the model can contain.

int kddml.Core.DataMining.AssociationRules.AssociationModel.MAX_NUMBER_OF_RULES = 5000 [static]
 

The max number of association rules that the model can contain.


Generated on Thu Feb 23 13:04:38 2006 for kddml by  doxygen 1.4.3