Package tutorial.clustering
Class NaiveAgglomerativeHierarchicalClustering1<O>
- java.lang.Object
-
- tutorial.clustering.NaiveAgglomerativeHierarchicalClustering1<O>
-
- Type Parameters:
O
- Object type
- All Implemented Interfaces:
Algorithm
public class NaiveAgglomerativeHierarchicalClustering1<O> extends java.lang.Object implements Algorithm
This tutorial will step you through implementing a well known clustering algorithm, agglomerative hierarchical clustering, in multiple steps.This is the first step, where we implement it with single linkage only, and extract a fixed number of clusters. The follow up variants will be made more flexible.
This is the naive O(n³) algorithm. See
SLINK
for a much faster algorithm (however, only for single-linkage).- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface elki.Algorithm
Algorithm.Utils
-
-
Constructor Summary
Constructors Constructor Description NaiveAgglomerativeHierarchicalClustering1(Distance<? super O> distance, int numclusters)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeInformation[]
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.Clustering<Model>
run(Relation<O> relation)
Perform HAC
-
-
-
Method Detail
-
getInputTypeRestriction
public TypeInformation[] getInputTypeRestriction()
Description copied from interface:Algorithm
Get the input type restriction used for negotiating the data query.- Specified by:
getInputTypeRestriction
in interfaceAlgorithm
- Returns:
- Type restriction
-
run
public Clustering<Model> run(Relation<O> relation)
Perform HAC- Parameters:
relation
- Data relation- Returns:
- Clustering
-
-