Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.algorithm.result
Class AprioriResult

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.algorithm.result.AbstractResult<BitVector>
          extended by de.lmu.ifi.dbs.elki.algorithm.result.AprioriResult
All Implemented Interfaces:
Result<BitVector>, Loggable

public class AprioriResult
extends AbstractResult<BitVector>

Stores a apriori result.

Author:
Arthur Zimek

Field Summary
private static NumberFormat numberFormat
          Number Format for output purposes.
private  List<BitSet> solution
          The frequent itemsets.
private  Map<BitSet,Integer> supports
          The supports of all itemsets.
 
Fields inherited from class de.lmu.ifi.dbs.elki.algorithm.result.AbstractResult
db, FILE_EXTENSION
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug
 
Fields inherited from interface de.lmu.ifi.dbs.elki.algorithm.result.Result
SEPARATOR
 
Constructor Summary
AprioriResult(List<BitSet> solution, Map<BitSet,Integer> supports, Database<BitVector> database)
          Provides a apriori result.
 
Method Summary
 List<BitSet> getSolution()
          Returns the frequent item sets.
 Map<BitSet,Integer> getSupports()
          Returns the frequencies of the frequent item sets.
 void output(File out, Normalization<BitVector> normalization, List<AttributeSettings> settings)
          Prints the frequent itemsets annotating their reqpective frequency.
 void output(PrintStream outStream, Normalization<BitVector> normalization, List<AttributeSettings> settings)
          Writes the clustering result to the given stream.
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.result.AbstractResult
getDatabase, writeHeader
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numberFormat

private static final NumberFormat numberFormat
Number Format for output purposes.


solution

private List<BitSet> solution
The frequent itemsets.


supports

private Map<BitSet,Integer> supports
The supports of all itemsets.

Constructor Detail

AprioriResult

public AprioriResult(List<BitSet> solution,
                     Map<BitSet,Integer> supports,
                     Database<BitVector> database)
Provides a apriori result.

Parameters:
solution - the frequent itemsets
supports - the supports of all itemsets
database - the database, where the itemsets have been evaluated
Method Detail

output

public void output(File out,
                   Normalization<BitVector> normalization,
                   List<AttributeSettings> settings)
            throws UnableToComplyException
Prints the frequent itemsets annotating their reqpective frequency. Parameter normalization will remain unused.

Specified by:
output in interface Result<BitVector>
Overrides:
output in class AbstractResult<BitVector>
Parameters:
out - file, which designates the location to write the results, or which's name designates the prefix of any locations to write the results, or which could remain null to designate the standard-out as location for output.
normalization - Normalization to restore original values according to, if this action is supported - may remain null.
settings - the settings to be written into the header, if this parameter is null, no header will be written
Throws:
UnableToComplyException - if any feature vector is not compatible with values initialized during normalization
See Also:
Result.output(File,Normalization,List)

output

public void output(PrintStream outStream,
                   Normalization<BitVector> normalization,
                   List<AttributeSettings> settings)
            throws UnableToComplyException
Description copied from interface: Result
Writes the clustering result to the given stream.

Parameters:
outStream - the stream to write to
normalization - Normalization to restore original values according to, if this action is supported - may remain null.
settings - the settings to be written into the header, if this parameter is null, no header will be written
Throws:
UnableToComplyException - if any feature vector is not compatible with values initialized during normalization
See Also:
Result.output(java.io.PrintStream,de.lmu.ifi.dbs.elki.normalization.Normalization,java.util.List)

getSolution

public List<BitSet> getSolution()
Returns the frequent item sets.

Returns:
the frequent item sets.

getSupports

public Map<BitSet,Integer> getSupports()
Returns the frequencies of the frequent item sets.

Returns:
the frequencies of the frequent item sets

Release 0.1 (2008-07-10_1838)