Skip to content

Commit 281e6c4

Browse files
authored
zero as min value
1 parent 1028572 commit 281e6c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elastiknn-models/src/main/java/com/klibisz/elastiknn/models/ExactModel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ public static double cosineSimilarity(FloatVectorOps floatVectorOps, float[] v1,
4141

4242
@ForceInline
4343
public static double dotSimilarity(FloatVectorOps floatVectorOps, float[] v1, float[] v2) {
44-
return Math.max(-1.0,1 + floatVectorOps.dotSimilarity(v1, v2));
44+
return Math.max(0.0,1.0 + floatVectorOps.dotSimilarity(v1, v2));
4545
}
4646
}

0 commit comments

Comments
 (0)