Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.algorithm.result.clustering
Class CASHResult

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

public class CASHResult
extends AbstractResult<ParameterizationFunction>

TODO: comment

Author:
Elke Achtert

Field Summary
static String CLUSTER_MARKER
          Marker for a file name of a cluster.
private  SubspaceClusterMap clusterMap
          The mapping between subspace dimensions and clusters.
private  int dimensionality
          The dimensionality of the feature space.
static String FILE_EXTENSION
          Extension for txt-files.
static String NOISE_MARKER
          Marker for a file name of noise.
 
Fields inherited from class de.lmu.ifi.dbs.elki.algorithm.result.AbstractResult
db
 
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
CASHResult(Database<ParameterizationFunction> db, SubspaceClusterMap clusterMap, int dimensionality)
          todo
 
Method Summary
 void output(File out, Normalization<ParameterizationFunction> normalization, List<AttributeSettings> settings)
          Writes the clustering result to the given file.
 void output(PrintStream outStream, Normalization<ParameterizationFunction> normalization, List<AttributeSettings> settings)
          todo Writes the clustering result to the given stream.
private  void write(int clusterDimensionality, Set<Integer> clusterIDs, LinearEquationSystem clusterDependency, PrintStream out, Normalization<ParameterizationFunction> normalization, List<AttributeSettings> settings)
          Writes a cluster to the designated print 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

CLUSTER_MARKER

public static final String CLUSTER_MARKER
Marker for a file name of a cluster.

See Also:
Constant Field Values

NOISE_MARKER

public static final String NOISE_MARKER
Marker for a file name of noise.

See Also:
Constant Field Values

FILE_EXTENSION

public static final String FILE_EXTENSION
Extension for txt-files.

See Also:
Constant Field Values

clusterMap

private SubspaceClusterMap clusterMap
The mapping between subspace dimensions and clusters.


dimensionality

private int dimensionality
The dimensionality of the feature space.

Constructor Detail

CASHResult

public CASHResult(Database<ParameterizationFunction> db,
                  SubspaceClusterMap clusterMap,
                  int dimensionality)
todo

Parameters:
db -
Method Detail

output

public void output(PrintStream outStream,
                   Normalization<ParameterizationFunction> normalization,
                   List<AttributeSettings> settings)
            throws UnableToComplyException
todo 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

output

public void output(File out,
                   Normalization<ParameterizationFunction> 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<ParameterizationFunction>
Overrides:
output in class AbstractResult<ParameterizationFunction>
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)

write

private void write(int clusterDimensionality,
                   Set<Integer> clusterIDs,
                   LinearEquationSystem clusterDependency,
                   PrintStream out,
                   Normalization<ParameterizationFunction> normalization,
                   List<AttributeSettings> settings)
            throws NonNumericFeaturesException
Writes a cluster to the designated print stream.

Parameters:
clusterDimensionality - the dimensionality of the cluster to be written
clusterIDs - the ids belonging to the cluster to be written
clusterDependency - the dependencies of the cluster
out - the print stream where to write
normalization - a Normalization to restore original values for output - may remain null
settings - the settings to be written into the header
Throws:
NonNumericFeaturesException - if feature vector is not compatible with values initialized during normalization

Release 0.1 (2008-07-10_1838)