Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
          extended by de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm<V>
              extended by de.lmu.ifi.dbs.elki.algorithm.clustering.correlation.ERiC<V>
Type Parameters:
V - the type of Realvector handled by this Algorithm
All Implemented Interfaces:
Algorithm<V>, Loggable, Parameterizable

public class ERiC<V extends RealVector<V,?>>
extends AbstractAlgorithm<V>

Performs correlation clustering on the data partitioned according to local correlation dimensionality and builds a hierarchy of correlation clusters that allows multiple inheritance from the clustering result.

Author:
Elke Achtert

Field Summary
private  COPAC<V> copacAlgorithm
          The COPAC clustering algorithm.
private  HierarchicalCorrelationClusters<V> result
          Holds the result.
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
optionHandler
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug
 
Constructor Summary
ERiC()
          Performs the COPAC algorithm on the data and builds a hierarchy of correlation clusters that allows multiple inheritance from the clustering result.
 
Method Summary
private  void buildHierarchy(int dimensionality, SortedMap<Integer,List<HierarchicalCorrelationCluster<V>>> clusterMap)
           
 String description()
          Returns a description of the class and the required parameters.
private  SortedMap<Integer,List<HierarchicalCorrelationCluster<V>>> extractCorrelationClusters(Database<V> database, int dimensionality)
          Extracts the correlation clusters and noise from the copac result and returns a mapping of correlation dimension to maps of clusters within this correlation dimension.
 List<AttributeSettings> getAttributeSettings()
          Returns the parameter setting of the attributes.
 Description getDescription()
          Returns a description of the algorithm.
 Result<V> getResult()
          Returns the result of the algorithm.
private  boolean isParent(ERiCDistanceFunction distanceFunction, HierarchicalCorrelationCluster<V> parent, List<HierarchicalCorrelationCluster<V>> children)
          Returns true, if the specified parent cluster is a parent of one child of the children clusters.
private  String[] pcaParameters(int correlationDimension)
          Returns the parameters for the PCA for the specified correlation dimension.
protected  void runInTime(Database<V> database)
          The run method encapsulated in measure of runtime.
 String[] setParameters(String[] args)
          Passes remaining parameters to the clustering algorithm.
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm
isTime, isVerbose, run, setTime, setVerbose
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
addOption, checkGlobalParameterConstraints, deleteOption, description, description, getParameters, getParameterValue, getPossibleOptions, inlineDescription, isSet, setParameters
 
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
 
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, getParameters, getPossibleOptions, inlineDescription
 

Field Detail

copacAlgorithm

private COPAC<V extends RealVector<V,?>> copacAlgorithm
The COPAC clustering algorithm.


result

private HierarchicalCorrelationClusters<V extends RealVector<V,?>> result
Holds the result.

Constructor Detail

ERiC

public ERiC()
Performs the COPAC algorithm on the data and builds a hierarchy of correlation clusters that allows multiple inheritance from the clustering result.

Method Detail

runInTime

protected void runInTime(Database<V> database)
                  throws IllegalStateException
The run method encapsulated in measure of runtime. An extending class needs not to take care of runtime itself.

Specified by:
runInTime in class AbstractAlgorithm<V extends RealVector<V,?>>
Parameters:
database - the database to run the algorithm on
Throws:
IllegalStateException - if the algorithm has not been initialized properly (e.g. the setParameters(String[]) method has been failed to be called).

getResult

public Result<V> getResult()
Returns the result of the algorithm.

Returns:
the result of the algorithm

description

public String description()
Description copied from interface: Parameterizable
Returns a description of the class and the required parameters.

This description should be suitable for a usage description as for a standalone application.

Specified by:
description in interface Parameterizable
Overrides:
description in class AbstractAlgorithm<V extends RealVector<V,?>>
Returns:
String a description of the class and the required parameters
See Also:
Parameterizable.description()

getDescription

public Description getDescription()
Returns a description of the algorithm.

Returns:
a description of the algorithm

setParameters

public String[] setParameters(String[] args)
                       throws ParameterException
Passes remaining parameters to the clustering algorithm.

Specified by:
setParameters in interface Parameterizable
Overrides:
setParameters in class AbstractAlgorithm<V extends RealVector<V,?>>
Parameters:
args - parameters to set the attributes accordingly to
Returns:
String[] an array containing the unused parameters
Throws:
ParameterException - in case of wrong parameter-setting
See Also:
Parameterizable.setParameters(String[])

getAttributeSettings

public List<AttributeSettings> getAttributeSettings()
Returns the parameter setting of the attributes.

Specified by:
getAttributeSettings in interface Parameterizable
Overrides:
getAttributeSettings in class AbstractParameterizable
Returns:
the parameter setting of the attributes
See Also:
Parameterizable.getAttributeSettings()

extractCorrelationClusters

private SortedMap<Integer,List<HierarchicalCorrelationCluster<V>>> extractCorrelationClusters(Database<V> database,
                                                                                              int dimensionality)
Extracts the correlation clusters and noise from the copac result and returns a mapping of correlation dimension to maps of clusters within this correlation dimension. Each cluster is defined by the basis vectors defining the subspace in which the cluster appears.

Parameters:
database - the database containing the objects
dimensionality - the dimensionality of the feature space
Returns:
a mapping of correlation dimension to maps of clusters

pcaParameters

private String[] pcaParameters(int correlationDimension)
Returns the parameters for the PCA for the specified correlation dimension.

Parameters:
correlationDimension - the correlation dimension
Returns:
the parameters for the PCA for the specified correlation dimension

buildHierarchy

private void buildHierarchy(int dimensionality,
                            SortedMap<Integer,List<HierarchicalCorrelationCluster<V>>> clusterMap)

isParent

private boolean isParent(ERiCDistanceFunction distanceFunction,
                         HierarchicalCorrelationCluster<V> parent,
                         List<HierarchicalCorrelationCluster<V>> children)
Returns true, if the specified parent cluster is a parent of one child of the children clusters.

Parameters:
distanceFunction - the distance function for distance computation between the clusters
parent - the parent to be tested
children - the list of children to be tested
Returns:
true, if the specified parent cluster is a parent of one child of the children clusters, false otherwise

Release 0.1 (2008-07-10_1838)