Class AbstractCutDendrogram.Instance
- java.lang.Object
-
- elki.clustering.hierarchical.extraction.AbstractCutDendrogram.Instance
-
- Direct Known Subclasses:
CutDendrogramByHeight.Instance
,CutDendrogramByNumberOfClusters.Instance
- Enclosing class:
- AbstractCutDendrogram
public abstract class AbstractCutDendrogram.Instance extends java.lang.Object
Instance for a single data set.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.ArrayList<ModifiableDBIDs>
clusterMembers
Collected cluster membersprotected it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap
leafMap
Map clusters to integer cluster numbers.protected IntegerArray
leafTop
Topmost merge of each leaf.protected ClusterMergeHistory
merges
The hierarchical result to process.
-
Constructor Summary
Constructors Constructor Description Instance(ClusterMergeHistory merges)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private Clustering<DendrogramModel>
buildFlat(int split, FiniteProgress progress)
Build a flat clustering.private Clustering<DendrogramModel>
buildHierarchical(int split, FiniteProgress progress)
Build a hierarchical clustering.private void
buildLeafClusters(int split, FiniteProgress progress)
Prepare the leaf clusters by executing the first (size - 1 - split) merges.Clustering<DendrogramModel>
extractClusters()
Extract all clusters from the pi-lambda-representation.protected abstract int
findSplit()
Find the splitting point in the merge history.protected Cluster<DendrogramModel>
makeCluster(int seq, DBIDs members)
Make the cluster for the given object
-
-
-
Field Detail
-
merges
protected ClusterMergeHistory merges
The hierarchical result to process.
-
leafMap
protected it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap leafMap
Map clusters to integer cluster numbers.
-
leafTop
protected IntegerArray leafTop
Topmost merge of each leaf.
-
clusterMembers
protected java.util.ArrayList<ModifiableDBIDs> clusterMembers
Collected cluster members
-
-
Constructor Detail
-
Instance
public Instance(ClusterMergeHistory merges)
Constructor.- Parameters:
merges
- Cluster merge history
-
-
Method Detail
-
extractClusters
public Clustering<DendrogramModel> extractClusters()
Extract all clusters from the pi-lambda-representation.- Returns:
- Hierarchical clustering
-
buildLeafClusters
private void buildLeafClusters(int split, FiniteProgress progress)
Prepare the leaf clusters by executing the first (size - 1 - split) merges.- Parameters:
split
- Splitting pointprogress
- Progress for logging (may benull
)
-
buildFlat
private Clustering<DendrogramModel> buildFlat(int split, FiniteProgress progress)
Build a flat clustering.- Parameters:
split
- Splitting pointprogress
- Progress for logging (may benull
)- Returns:
- Clustering
-
buildHierarchical
private Clustering<DendrogramModel> buildHierarchical(int split, FiniteProgress progress)
Build a hierarchical clustering.- Parameters:
split
- Splitting pointprogress
- Progress for logging (may benull
)- Returns:
- Clustering
-
findSplit
protected abstract int findSplit()
Find the splitting point in the merge history.- Returns:
- Splitting point
-
makeCluster
protected Cluster<DendrogramModel> makeCluster(int seq, DBIDs members)
Make the cluster for the given object- Parameters:
seq
- Cluster sequence numbermembers
- Member objects- Returns:
- Cluster
-
-