Skip to content

Commit adae185

Browse files
Share MIN_NODE_BATCH_SIZE between the LP strategies
Co-authored-by: Florentin Dörre <[email protected]>
1 parent 1438cd7 commit adae185

File tree

4 files changed

+2
-4
lines changed

4 files changed

+2
-4
lines changed

alpha/alpha-proc/src/main/java/org/neo4j/gds/ml/linkmodels/pipeline/predict/ApproximateLinkPrediction.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
import java.util.stream.Stream;
4040

4141
public class ApproximateLinkPrediction extends LinkPrediction {
42-
static final int MIN_NODE_BATCH_SIZE = 10;
4342
private final KnnBaseConfig knnConfig;
4443

4544
public ApproximateLinkPrediction(

alpha/alpha-proc/src/main/java/org/neo4j/gds/ml/linkmodels/pipeline/predict/ExhaustiveLinkPrediction.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import java.util.stream.LongStream;
3636

3737
public class ExhaustiveLinkPrediction extends LinkPrediction {
38-
private static final int MIN_NODE_BATCH_SIZE = 10;
3938
private final int topN;
4039
private final double threshold;
4140

alpha/alpha-proc/src/main/java/org/neo4j/gds/ml/linkmodels/pipeline/predict/LinkPrediction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import org.neo4j.gds.ml.linkmodels.pipeline.logisticRegression.LinkLogisticRegressionPredictor;
2929

3030
public abstract class LinkPrediction extends Algorithm<LinkPrediction, LinkPredictionResult> {
31-
31+
static final int MIN_NODE_BATCH_SIZE = 10;
3232
private final LinkLogisticRegressionData modelData;
3333
private final LinkFeatureExtractor linkFeatureExtractor;
3434
private final Graph graph;

alpha/alpha-proc/src/main/java/org/neo4j/gds/ml/linkmodels/pipeline/predict/LinkPredictionPredictPipelineBaseConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ default KnnBaseConfig approximateConfig() {
116116
var knnBuilder = ImmutableKnnBaseConfig.builder()
117117
.sampleRate(sampleRate())
118118
.nodeWeightProperty("NotUsedInLP")
119-
.minBatchSize(ApproximateLinkPrediction.MIN_NODE_BATCH_SIZE)
119+
.minBatchSize(LinkPrediction.MIN_NODE_BATCH_SIZE)
120120
.concurrency(concurrency());
121121

122122
topK().ifPresent(knnBuilder::topK);

0 commit comments

Comments
 (0)