And only for clusters

This commit is contained in:
Manav Rathi
2024-09-02 17:45:09 +05:30
parent 9428a13f7a
commit 70e56d748a

View File

@@ -505,11 +505,12 @@ const clusterLinear = (
nClusterIndex = jClusterIndex;
nClusterCosineSimilarity = csim;
}
}
// If we've found something "near enough", stop looking for a
// better match. This speeds up clustering.
if (earlyExitThreshold > 0 && csim < earlyExitThreshold) break;
// If we've found something "near enough", stop looking for a
// better match. This speeds up clustering.
if (earlyExitThreshold > 0 && csim < earlyExitThreshold)
break;
}
}
}