Class HDBSCANHierarchyExtraction.Instance
- java.lang.Object
-
- elki.clustering.hierarchical.extraction.HDBSCANHierarchyExtraction.Instance
-
- Enclosing class:
- HDBSCANHierarchyExtraction
protected class HDBSCANHierarchyExtraction.Instance extends java.lang.ObjectInstance for a single data set.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected DoubleDataStorecoredistCore distances, if available.protected ClusterMergeHistorymergesThe hierarchical result to process.
-
Constructor Summary
Constructors Constructor Description Instance(ClusterMergeHistory merges)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private doublecollectChildren(HDBSCANHierarchyExtraction.TempCluster temp, Clustering<DendrogramModel> clustering, WritableDoubleDataStore glosh, HDBSCANHierarchyExtraction.TempCluster cur, Cluster<DendrogramModel> clus, boolean flatten)Recursive flattening of clusters.private doublefinalizeCluster(HDBSCANHierarchyExtraction.TempCluster temp, Clustering<DendrogramModel> clustering, WritableDoubleDataStore glosh, Cluster<DendrogramModel> parent, boolean flatten)Make the cluster for the given objectprivate booleanisSpurious(HDBSCANHierarchyExtraction.TempCluster clus, boolean isCore)Spurious, also for non-materialized clusters.Clustering<DendrogramModel>run()Extract all clusters from the pi-lambda-representation.
-
-
-
Field Detail
-
merges
protected ClusterMergeHistory merges
The hierarchical result to process.
-
coredist
protected DoubleDataStore coredist
Core distances, if available.
-
-
Constructor Detail
-
Instance
public Instance(ClusterMergeHistory merges)
Constructor.- Parameters:
merges- Hierarchical result
-
-
Method Detail
-
run
public Clustering<DendrogramModel> run()
Extract all clusters from the pi-lambda-representation.- Returns:
- Hierarchical clustering
-
isSpurious
private boolean isSpurious(HDBSCANHierarchyExtraction.TempCluster clus, boolean isCore)
Spurious, also for non-materialized clusters.- Parameters:
clus- Cluster, may benullfor 1-element clusters.isCore- Core property- Returns:
trueif spurious.
-
finalizeCluster
private double finalizeCluster(HDBSCANHierarchyExtraction.TempCluster temp, Clustering<DendrogramModel> clustering, WritableDoubleDataStore glosh, Cluster<DendrogramModel> parent, boolean flatten)
Make the cluster for the given object- Parameters:
temp- Current temporary clusterclustering- Parent clusteringglosh- GLOSH scores outputparent- Parent cluster (for hierarchical output)flatten- Flag to flatten all clusters below- Returns:
- smallest distance when the cluster exists
-
collectChildren
private double collectChildren(HDBSCANHierarchyExtraction.TempCluster temp, Clustering<DendrogramModel> clustering, WritableDoubleDataStore glosh, HDBSCANHierarchyExtraction.TempCluster cur, Cluster<DendrogramModel> clus, boolean flatten)
Recursive flattening of clusters.- Parameters:
clustering- Output clusteringglosh- GLOSH scores outputcur- Current temporary clusterclus- Output clusterflatten- Flag to indicate everything below should be flattened- Returns:
- smallest distance when the cluster exists
-
-