Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.algorithm.result.clustering
Class ClustersPlusNoisePlusCorrelationAnalysis<V extends RealVector<V,?>>

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.clustering.ClustersPlusNoise<V>
              extended by de.lmu.ifi.dbs.elki.algorithm.result.clustering.ClustersPlusNoisePlusCorrelationAnalysis<V>
Type Parameters:
V - the type of RealVector handled by this Result
All Implemented Interfaces:
ClusteringResult<V>, Result<V>, Loggable

public class ClustersPlusNoisePlusCorrelationAnalysis<V extends RealVector<V,?>>
extends ClustersPlusNoise<V>

Provides a result of a clustering-algorithm that computes several clusters and remaining noise and a correlation analysis for each cluster.

Author:
Elke Achtert

Field Summary
private  CorrelationAnalysisSolution<V>[] correlationAnalysisSolutions
          An array of correlation analysis solutions for each cluster.
private  NumberFormat nf
          Number format for output accuracy.
 
Fields inherited from class de.lmu.ifi.dbs.elki.algorithm.result.clustering.ClustersPlusNoise
CLUSTER_LABEL_PREFIX, CLUSTER_MARKER, clustersAndNoise, clusterToModel, NOISE_MARKER
 
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
ClustersPlusNoisePlusCorrelationAnalysis(Integer[][] clustersAndNoise, Database<V> db, CorrelationAnalysisSolution<V>[] correlationAnalysisSolutions)
          Provides a result of a clustering-algorithm that computes several clusters and remaining noise and a correlation analysis for each cluster
ClustersPlusNoisePlusCorrelationAnalysis(Integer[][] clustersAndNoise, Database<V> db, CorrelationAnalysisSolution<V>[] correlationAnalysisSolutions, NumberFormat nf)
          Provides a result of a clustering-algorithm that computes several clusters and remaining noise and a correlation analysis for each cluster
 
Method Summary
 Integer[][] getClusterAndNoiseArray()
          Returns the clusters of this result.
 void output(File out, Normalization<V> normalization, List<AttributeSettings> settings)
          Writes the clustering result to the given file.
private  void write(int clusterIndex, PrintStream out, Normalization<V> normalization, List<AttributeSettings> settings)
          Writes a cluster denoted by its cluster number to the designated print stream.
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.result.clustering.ClustersPlusNoise
appendModel, associate, canonicalClusterLabel, classLabelToClusterID, clustering, getClusters, noise, output
 
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

correlationAnalysisSolutions

private CorrelationAnalysisSolution<V extends RealVector<V,?>>[] correlationAnalysisSolutions
An array of correlation analysis solutions for each cluster.


nf

private NumberFormat nf
Number format for output accuracy.

Constructor Detail

ClustersPlusNoisePlusCorrelationAnalysis

public ClustersPlusNoisePlusCorrelationAnalysis(Integer[][] clustersAndNoise,
                                                Database<V> db,
                                                CorrelationAnalysisSolution<V>[] correlationAnalysisSolutions,
                                                NumberFormat nf)
Provides a result of a clustering-algorithm that computes several clusters and remaining noise and a correlation analysis for each cluster

Parameters:
clustersAndNoise - an array of clusters and noise, respectively, where each array provides the object ids of its members
db - the database containing the objects of clusters
correlationAnalysisSolutions - an array of correlation analysis solutions for each cluster
nf - number format for output accuracy

ClustersPlusNoisePlusCorrelationAnalysis

public ClustersPlusNoisePlusCorrelationAnalysis(Integer[][] clustersAndNoise,
                                                Database<V> db,
                                                CorrelationAnalysisSolution<V>[] correlationAnalysisSolutions)
Provides a result of a clustering-algorithm that computes several clusters and remaining noise and a correlation analysis for each cluster

Parameters:
clustersAndNoise - an array of clusters and noise, respectively, where each array provides the object ids of its members
db - the database containing the objects of clusters
correlationAnalysisSolutions - an array of correlation analysis solutions for each cluster
Method Detail

output

public void output(File out,
                   Normalization<V> 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<V extends RealVector<V,?>>
Overrides:
output in class ClustersPlusNoise<V extends RealVector<V,?>>
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)

write

private void write(int clusterIndex,
                   PrintStream out,
                   Normalization<V> normalization,
                   List<AttributeSettings> settings)
            throws NonNumericFeaturesException
Writes a cluster denoted by its cluster number to the designated print stream.

Parameters:
clusterIndex - the number of the cluster to be written
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

getClusterAndNoiseArray

public Integer[][] getClusterAndNoiseArray()
Returns the clusters of this result. Each array provides the object ids of one cluster.

Overrides:
getClusterAndNoiseArray in class ClustersPlusNoise<V extends RealVector<V,?>>
Returns:
the clusters of this result

Release 0.1 (2008-07-10_1838)