@@ -37,15 +37,15 @@ public class HDBScan extends Algorithm<HugeLongArray> {
37
37
private final Concurrency concurrency ;
38
38
private final long leafSize ;
39
39
private final TerminationFlag terminationFlag ;
40
- private final int k ;
40
+ private final int samples ;
41
41
private final long minClusterSize ;
42
42
43
43
protected HDBScan (
44
44
IdMap nodes ,
45
45
NodePropertyValues nodePropertyValues ,
46
46
Concurrency concurrency ,
47
47
long leafSize ,
48
- int k ,
48
+ int samples ,
49
49
long minClusterSize ,
50
50
ProgressTracker progressTracker ,
51
51
TerminationFlag terminationFlag
@@ -55,7 +55,7 @@ protected HDBScan(
55
55
this .nodePropertyValues = nodePropertyValues ;
56
56
this .concurrency = concurrency ;
57
57
this .leafSize = leafSize ;
58
- this .k = k ;
58
+ this .samples = samples ;
59
59
this .minClusterSize = minClusterSize ;
60
60
this .terminationFlag = terminationFlag ;
61
61
}
@@ -66,13 +66,12 @@ public HugeLongArray compute() {
66
66
67
67
var nodeCount = nodes .nodeCount ();
68
68
var coreResult = computeCores (kdTree , nodeCount );
69
- // var dualTreeMST = dualTreeMSTPhase();
70
69
var dualTreeMST = dualTreeMSTPhase (kdTree , coreResult );
71
70
var clusterHierarchy = createClusterHierarchy (dualTreeMST );
72
71
var condenseStep = new CondenseStep (nodeCount );
73
72
var condensedTree = condenseStep .condense (clusterHierarchy , minClusterSize );
74
73
var labellingStep = new LabellingStep (condensedTree , nodeCount );
75
- return labellingStep .label ();
74
+ return labellingStep .labels ();
76
75
}
77
76
78
77
CoreResult computeCores (KdTree kdTree , long nodeCount ) {
@@ -81,7 +80,7 @@ CoreResult computeCores(KdTree kdTree, long nodeCount) {
81
80
ParallelUtil .parallelForEachNode (
82
81
nodeCount , concurrency , terminationFlag ,
83
82
(nodeId ) -> {
84
- neighbours .set (nodeId , kdTree .neighbours (nodeId , k ));
83
+ neighbours .set (nodeId , kdTree .neighbours (nodeId , samples ));
85
84
}
86
85
);
87
86
0 commit comments