de.lmu.ifi.dbs.elki.algorithm.clustering.trivial
Class ByLabelHierarchicalClustering

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm<Clustering<Model>>
      extended by de.lmu.ifi.dbs.elki.algorithm.clustering.trivial.ByLabelHierarchicalClustering
All Implemented Interfaces:
Algorithm, ClusteringAlgorithm<Clustering<Model>>, InspectionUtilFrequentlyScanned, Parameterizable

@Title(value="Hierarchical clustering by label")
@Description(value="Cluster points by a (pre-assigned!) label. For comparing results with a reference clustering.")
public class ByLabelHierarchicalClustering
extends AbstractAlgorithm<Clustering<Model>>
implements ClusteringAlgorithm<Clustering<Model>>

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?)


Field Summary
private static Logging logger
          The logger for this class.
 
Constructor Summary
ByLabelHierarchicalClustering()
          Constructor without parameters
 
Method Summary
 TypeInformation[] getInputTypeRestriction()
          Get the input type restriction used for negotiating the data query.
protected  Logging getLogger()
          Get the (STATIC) logger for this class.
 Clustering<Model> run(Database database)
          Runs the algorithm.
 Clustering<Model> run(Relation<?> relation)
          Run the actual clustering algorithm.
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm
makeParameterDistanceFunction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final Logging logger
The logger for this class.

Constructor Detail

ByLabelHierarchicalClustering

public ByLabelHierarchicalClustering()
Constructor without parameters

Method Detail

run

public Clustering<Model> run(Database database)
Description copied from interface: Algorithm
Runs the algorithm.

Specified by:
run in interface Algorithm
Specified by:
run in interface ClusteringAlgorithm<Clustering<Model>>
Overrides:
run in class AbstractAlgorithm<Clustering<Model>>
Parameters:
database - the database to run the algorithm on
Returns:
the Result computed by this algorithm

run

public Clustering<Model> run(Relation<?> relation)
                      throws IllegalStateException
Run the actual clustering algorithm.

Parameters:
relation - The data input to use
Throws:
IllegalStateException

getInputTypeRestriction

public TypeInformation[] getInputTypeRestriction()
Description copied from class: AbstractAlgorithm
Get the input type restriction used for negotiating the data query.

Specified by:
getInputTypeRestriction in interface Algorithm
Specified by:
getInputTypeRestriction in class AbstractAlgorithm<Clustering<Model>>
Returns:
Type restriction

getLogger

protected Logging getLogger()
Description copied from class: AbstractAlgorithm
Get the (STATIC) logger for this class.

Specified by:
getLogger in class AbstractAlgorithm<Clustering<Model>>
Returns:
the static logger

Release 0.4.0 (2011-09-20_1324)