org.put.semintec.mining.association
Class AssociationRuleGeneration

java.lang.Object
  extended by org.put.semintec.mining.association.AssociationRuleGeneration

public class AssociationRuleGeneration
extends java.lang.Object

Represents an algorithm for generation of relational association rules (query extensions) from discovered frequent patterns.

Author:
Agnieszka Lawrynowicz

Constructor Summary
AssociationRuleGeneration()
           
 
Method Summary
 void generate()
          Executes the algorithm generating rules.
 KnowledgeBase getKbCopy()
          Getter of the property kbCopy
 java.util.ArrayList getRules()
          Getter of the property rules
 Trie getTrie()
          Getter of the property trie
 boolean redundantWrtEarlierRule(AssociationRule rule, KnowledgeBase kb)
          Checks if the specified rule has a consequent that subsumes a consequent of an already generated rule with the same antecedent as that of a given one.
 void setKbCopy(KnowledgeBase kbCopy)
          Setter of the property kbCopy
 void setRules(java.util.ArrayList rules)
          Setter of the property rules
 void setTrie(Trie trie)
          Setter of the property trie
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssociationRuleGeneration

public AssociationRuleGeneration()
Method Detail

getTrie

public Trie getTrie()
Getter of the property trie

Returns:
Returns the trie.

setTrie

public void setTrie(Trie trie)
Setter of the property trie

Parameters:
trie - The trie to set.

setKbCopy

public void setKbCopy(KnowledgeBase kbCopy)
Setter of the property kbCopy

Parameters:
kbCopy - The kbCopy to set.

getKbCopy

public KnowledgeBase getKbCopy()
Getter of the property kbCopy

Returns:
Returns the kbCopy.

getRules

public java.util.ArrayList getRules()
Getter of the property rules

Returns:
Returns the rules.

setRules

public void setRules(java.util.ArrayList rules)
Setter of the property rules

Parameters:
rules - The rules to set.

generate

public void generate()
Executes the algorithm generating rules.


redundantWrtEarlierRule

public boolean redundantWrtEarlierRule(AssociationRule rule,
                                       KnowledgeBase kb)
                                throws org.semanticweb.kaon2.api.KAON2Exception,
                                       java.lang.InterruptedException
Checks if the specified rule has a consequent that subsumes a consequent of an already generated rule with the same antecedent as that of a given one. If so, then the given rule is called redundant, and there is already generated essential one. Check is done by searching the list of already generated rules.

Parameters:
r - Rule whose essential rule is searched in the trie
kb - Knowledge base wrt which subsumption/containmnet of rule consequents is checked
Returns:
True if the rule is redundant due to already generated one, false otherwise
Throws:
java.lang.InterruptedException
org.semanticweb.kaon2.api.KAON2Exception