org.put.semintec.mining.association
Class PatternMiningWithoutBackgroundKnowledge

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

public class PatternMiningWithoutBackgroundKnowledge
extends java.lang.Object

Represents an algorithm for mining patterns that do not exploit KB semantics during pattern generation.

Author:
Agnieszka Lawrynowicz

Field Summary
static int BREADTH_FIRST_SEARCH
          Breadth-first search direction for patterns.
static int DEPTH_FIRST_SEARCH
          Depth-first search direction for patterns.
 
Constructor Summary
PatternMiningWithoutBackgroundKnowledge()
           
 
Method Summary
 boolean addToInfrequentPatterns(Pattern p, KnowledgeBase kb)
           
 boolean getAnswerCaching()
          Getter of the property answerCaching
 Bias getBias()
          Getter of the property bias
 java.util.ArrayList getInfrequentPatterns()
          Getter of the property infrequentPatterns
 KnowledgeBase getKb()
          Getter of the property kb
 KnowledgeBase getKbCopy()
          Getter of the property kbCopy
 int getMaxLength()
          Getter of the property maxLength
 double getMinSupport()
          Getter of the property minSupport
 org.semanticweb.kaon2.api.owl.elements.OWLClass getRefClass()
          Getter of the property refClass
 org.semanticweb.kaon2.api.logic.Variable getRefVar()
          Getter of the property refVar
 int getSearchDirection()
          Getter of the property searchDirection
 Statistics getStatistics()
          Getter of the property statistics
 Trie getTrie()
          Getter of the property trie
 void mine()
          Executes the algorithm for pattern mining.
 void setAnswerCaching(boolean answerCaching)
          Setter of the property answerCaching
 void setBias(Bias bias)
          Setter of the property bias
 void setInfrequentPatterns(java.util.ArrayList infrequentPatterns)
          Setter of the property infrequentPatterns
 void setKb(KnowledgeBase kb)
          Setter of the property kb
 void setKbCopy(KnowledgeBase kbCopy)
          Setter of the property kbCopy
 void setMaxLength(int maxLength)
          Setter of the property maxLength
 void setMinSupport(double minSupport)
          Setter of the property minSupport
 void setRefClass(org.semanticweb.kaon2.api.owl.elements.OWLClass refClass)
          Setter of the property refClass
 void setRefVar(org.semanticweb.kaon2.api.logic.Variable refVar)
          Setter of the property refVar
 void setSearchDirection(int searchDirection)
          Setter of the property searchDirection
 void setStatistics(Statistics statistics)
          Setter of the property statistics
 void setTrie(Trie trie)
          Setter of the property trie
 boolean subsumedByInfrequentPattern(Pattern p, KnowledgeBase kb)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEPTH_FIRST_SEARCH

public static int DEPTH_FIRST_SEARCH
Depth-first search direction for patterns.


BREADTH_FIRST_SEARCH

public static int BREADTH_FIRST_SEARCH
Breadth-first search direction for patterns.

Constructor Detail

PatternMiningWithoutBackgroundKnowledge

public PatternMiningWithoutBackgroundKnowledge()
Method Detail

getInfrequentPatterns

public java.util.ArrayList getInfrequentPatterns()
Getter of the property infrequentPatterns

Returns:
Returns the infrequentPatterns.

setInfrequentPatterns

public void setInfrequentPatterns(java.util.ArrayList infrequentPatterns)
Setter of the property infrequentPatterns

Parameters:
infrequentPatterns - The infrequentPatterns to set.

getBias

public Bias getBias()
Getter of the property bias

Returns:
Returns the bias.

setBias

public void setBias(Bias bias)
Setter of the property bias

Parameters:
bias - The bias to set.

getStatistics

public Statistics getStatistics()
Getter of the property statistics

Returns:
Returns the statistics.

setStatistics

public void setStatistics(Statistics statistics)
Setter of the property statistics

Parameters:
statistics - The statistics to set.

getSearchDirection

public int getSearchDirection()
Getter of the property searchDirection

Returns:
Returns the searchDirection.

setSearchDirection

public void setSearchDirection(int searchDirection)
Setter of the property searchDirection

Parameters:
searchDirection - The searchDirection to set.

getAnswerCaching

public boolean getAnswerCaching()
Getter of the property answerCaching

Returns:
Returns the answerCaching.

setAnswerCaching

public void setAnswerCaching(boolean answerCaching)
Setter of the property answerCaching

Parameters:
answerCaching - The answerCaching to set.

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.

getKb

public KnowledgeBase getKb()
Getter of the property kb

Returns:
Returns the kb.

setKb

public void setKb(KnowledgeBase kb)
Setter of the property kb

Parameters:
kb - The kb 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.

getRefVar

public org.semanticweb.kaon2.api.logic.Variable getRefVar()
Getter of the property refVar

Returns:
Returns the refVar.

setRefVar

public void setRefVar(org.semanticweb.kaon2.api.logic.Variable refVar)
Setter of the property refVar

Parameters:
refVar - The refVar to set.

getRefClass

public org.semanticweb.kaon2.api.owl.elements.OWLClass getRefClass()
Getter of the property refClass

Returns:
Returns the refClass.

setRefClass

public void setRefClass(org.semanticweb.kaon2.api.owl.elements.OWLClass refClass)
Setter of the property refClass

Parameters:
refClass - The refClass to set.

getMaxLength

public int getMaxLength()
Getter of the property maxLength

Returns:
Returns the maxLength.

setMaxLength

public void setMaxLength(int maxLength)
Setter of the property maxLength

Parameters:
maxLength - The maxLength to set.

getMinSupport

public double getMinSupport()
Getter of the property minSupport

Returns:
Returns the minSupport.

setMinSupport

public void setMinSupport(double minSupport)
Setter of the property minSupport

Parameters:
minSupport - The minSupport to set.

mine

public void mine()
Executes the algorithm for pattern mining.


subsumedByInfrequentPattern

public boolean subsumedByInfrequentPattern(Pattern p,
                                           KnowledgeBase kb)
                                    throws org.semanticweb.kaon2.api.KAON2Exception,
                                           java.lang.InterruptedException
Parameters:
p - A pattern that is tested whether it is not subsumed by already found infrequent one
kb - A knowledge base w.r.t. pattern subsumption is tested.
Returns:
True if the given pattern is subsumed by already found infrequent one w.r.t. given knowledge base
Throws:
java.lang.InterruptedException
org.semanticweb.kaon2.api.KAON2Exception

addToInfrequentPatterns

public boolean addToInfrequentPatterns(Pattern p,
                                       KnowledgeBase kb)
                                throws org.semanticweb.kaon2.api.KAON2Exception,
                                       java.lang.InterruptedException
Parameters:
p - A pattern to be added to infrequent patterns list. In order to keep at the list the patterns that are maximally general, it is tested if the pattern is not subsumed by some pattern already present in the list and if this pattern does not subsume any other pattern on the list
kb - A knowledge base w.r.t. pattern subsumption is tested.
Returns:
True if pttern was added to infrequent patterns list, false otherwise (more general pattern has been found there)
Throws:
java.lang.InterruptedException
org.semanticweb.kaon2.api.KAON2Exception