@Title(value="Hierarchical clustering by label") @Description(value="Cluster points by a (pre-assigned!) label. For comparing results with a reference clustering.") @Alias(value="de.lmu.ifi.dbs.elki.algorithm.clustering.ByLabelHierarchicalClustering") @Priority(value=-105) public class ByLabelHierarchicalClustering extends AbstractAlgorithm<Clustering<Model>> implements ClusteringAlgorithm<Clustering<Model>>
Modifier and Type | Field and Description |
---|---|
private static Logging |
LOG
The logger for this class.
|
ALGORITHM_ID
Constructor and Description |
---|
ByLabelHierarchicalClustering()
Constructor without parameters
|
Modifier and Type | Method and Description |
---|---|
private void |
assign(java.util.HashMap<java.lang.String,DBIDs> labelMap,
java.lang.String label,
DBIDRef id)
Assigns the specified id to the labelMap according to its label
|
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.
|
private static final Logging LOG
public ByLabelHierarchicalClustering()
public Clustering<Model> run(Database database)
Algorithm
run
in interface Algorithm
run
in interface ClusteringAlgorithm<Clustering<Model>>
run
in class AbstractAlgorithm<Clustering<Model>>
database
- the database to run the algorithm onpublic Clustering<Model> run(Relation<?> relation)
relation
- The data input to useprivate void assign(java.util.HashMap<java.lang.String,DBIDs> labelMap, java.lang.String label, DBIDRef id)
labelMap
- the mapping of label to idslabel
- the label of the object to be assignedid
- the id of the object to be assignedpublic TypeInformation[] getInputTypeRestriction()
AbstractAlgorithm
getInputTypeRestriction
in interface Algorithm
getInputTypeRestriction
in class AbstractAlgorithm<Clustering<Model>>
protected Logging getLogger()
AbstractAlgorithm
getLogger
in class AbstractAlgorithm<Clustering<Model>>
Copyright © 2019 ELKI Development Team. License information.