Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.algorithm.clustering
Class ByLabelHierarchicalClustering<O extends DatabaseObject>

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<O,Clustering<Model>>
              extended by de.lmu.ifi.dbs.elki.algorithm.clustering.ByLabelHierarchicalClustering<O>
Type Parameters:
O -
All Implemented Interfaces:
Algorithm<O,Clustering<Model>>, ClusteringAlgorithm<Clustering<Model>,O>, Parameterizable

public class ByLabelHierarchicalClustering<O extends DatabaseObject>
extends AbstractAlgorithm<O,Clustering<Model>>
implements ClusteringAlgorithm<Clustering<Model>,O>

Pseudo clustering using labels. This "algorithm" puts elements into the same cluster when they agree in their labels. I.e. it just uses a predefined clustering, and is mostly useful for testing and evaluation (e.g. comparing the result of a real algorithm to a reference result / golden standard). This variant derives a hierarchical result by doing a prefix comparison on labels. TODO: Noise handling (e.g. allow the user to specify a noise label pattern?)

Author:
Erich Schubert

Field Summary
private  Clustering<Model> result
          Holds the result of the algorithm.
 
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, logger
 
Constructor Summary
ByLabelHierarchicalClustering()
           
 
Method Summary
 Description getDescription()
          Obtain a description of the algorithm
 Clustering<Model> getResult()
          Return clustering result
protected  Clustering<Model> runInTime(Database<O> database)
          Run the actual clustering algorithm.
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm
isTime, isVerbose, run, setParameters, setTime, setVerbose
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
addOption, addParameterizable, addParameterizable, checkGlobalParameterConstraints, collectOptions, getAttributeSettings, getParameters, rememberParametersExcept, removeOption, removeParameterizable, shortDescription
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, progress, 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.algorithm.clustering.ClusteringAlgorithm
run
 
Methods inherited from interface de.lmu.ifi.dbs.elki.algorithm.Algorithm
setTime, setVerbose
 
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, collectOptions, getParameters, setParameters, shortDescription
 

Field Detail

result

private Clustering<Model> result
Holds the result of the algorithm.

Constructor Detail

ByLabelHierarchicalClustering

public ByLabelHierarchicalClustering()
Method Detail

getResult

public Clustering<Model> getResult()
Return clustering result

Specified by:
getResult in interface Algorithm<O extends DatabaseObject,Clustering<Model>>
Specified by:
getResult in interface ClusteringAlgorithm<Clustering<Model>,O extends DatabaseObject>
Returns:
the result of the algorithm

getDescription

public Description getDescription()
Obtain a description of the algorithm

Specified by:
getDescription in interface Algorithm<O extends DatabaseObject,Clustering<Model>>
Returns:
a description of the algorithm

runInTime

protected Clustering<Model> runInTime(Database<O> database)
                               throws IllegalStateException
Run the actual clustering algorithm.

Specified by:
runInTime in class AbstractAlgorithm<O extends DatabaseObject,Clustering<Model>>
Parameters:
database - The database to process
Returns:
the Result computed by this algorithm
Throws:
IllegalStateException - if the algorithm has not been initialized properly (e.g. the setParameters(String[]) method has been failed to be called).

Release 0.2 (2009-07-06_1820)