Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.algorithm.result
Class PartitionResults<O extends DatabaseObject>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.algorithm.result.AbstractResult<O>
          extended by de.lmu.ifi.dbs.elki.algorithm.result.PartitionResults<O>
Type Parameters:
O - the type of DatabaseObjects handled by this Result
All Implemented Interfaces:
Result<O>, Loggable
Direct Known Subclasses:
PartitionClusteringResults

public class PartitionResults<O extends DatabaseObject>
extends AbstractResult<O>

A result for a partitioning algorithm providing a single result for a single partition.

Author:
Elke Achtert

Field Summary
static String PARTITION_LABEL_PREFIX
          A prefix for the partition-based class label.
static String PARTITION_MARKER
          A prefix for partition marks.
private  Map<Integer,Result<O>> partitionResults
          Holds the results for the partitions.
 
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
PartitionResults(Database<O> db, Map<Integer,Result<O>> resultMap)
          A result for a partitioning algorithm providing a single result for a single partition.
 
Method Summary
 void output(File out, Normalization<O> normalization, List<AttributeSettings> settings)
          Writes the clustering result to the given file.
 void output(PrintStream outStream, Normalization<O> 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

PARTITION_LABEL_PREFIX

public static final String PARTITION_LABEL_PREFIX
A prefix for the partition-based class label.

See Also:
Constant Field Values

PARTITION_MARKER

public static final String PARTITION_MARKER
A prefix for partition marks.

See Also:
Constant Field Values

partitionResults

private Map<Integer,Result<O extends DatabaseObject>> partitionResults
Holds the results for the partitions.

Constructor Detail

PartitionResults

public PartitionResults(Database<O> db,
                        Map<Integer,Result<O>> resultMap)
A result for a partitioning algorithm providing a single result for a single partition.

Parameters:
db - the database
resultMap - a map of partition IDs to results
Method Detail

output

public void output(File out,
                   Normalization<O> normalization,
                   List<AttributeSettings> settings)
            throws UnableToComplyException
Description copied from interface: Result
Writes the clustering result to the given file. Clustering result implementations, which are likely to provide several clusters are supposed to use the filename as prefix for every file to create and to append a proper suffix. In case of occuring IOExceptions the output is expected to be given at the standard-out. Therefore this behaviour should be also achievable by giving a null-Object as parameter.

Specified by:
output in interface Result<O extends DatabaseObject>
Overrides:
output in class AbstractResult<O extends DatabaseObject>
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(java.io.File, de.lmu.ifi.dbs.elki.normalization.Normalization,java.util.List)

output

public void output(PrintStream outStream,
                   Normalization<O> 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)

Release 0.1 (2008-07-10_1838)