Skip to content

Commit 42f600b

Browse files
Merge pull request #4931 from breakanalysis/1.8-lp-reduce-min-batch-size
1.8 LinkPrediction reduce min batch size
2 parents 495838d + adae185 commit 42f600b

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ ExhaustiveLinkPredictionResult predictLinks(
7575
partition,
7676
progressTracker
7777
),
78-
Optional.empty()
78+
Optional.of(MIN_NODE_BATCH_SIZE)
7979
);
8080

8181
ParallelUtil.runWithConcurrency(concurrency, tasks, Pools.DEFAULT);

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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ default KnnBaseConfig approximateConfig() {
116116
var knnBuilder = ImmutableKnnBaseConfig.builder()
117117
.sampleRate(sampleRate())
118118
.nodeWeightProperty("NotUsedInLP")
119+
.minBatchSize(LinkPrediction.MIN_NODE_BATCH_SIZE)
119120
.concurrency(concurrency());
120121

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

0 commit comments

Comments
 (0)