Skip to content

Commit 939ae4a

Browse files
author
nnethercott
committed
decrease iteration steps
1 parent 9912f73 commit 939ae4a

File tree

4 files changed

+327
-295
lines changed

4 files changed

+327
-295
lines changed

src/distance/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ fn two_means<D: Distance, R: Rng>(
129129
// points to either one of them. We weight each centroid by the number of points
130130
// assigned to it, so to balance it.
131131

132-
const ITERATION_STEPS: usize = 200;
132+
const ITERATION_STEPS: usize = 10;
133133

134134
let [leaf_p, leaf_q] = leafs.choose_two(rng)?.unwrap();
135135
let (mut leaf_p, mut leaf_q) = (leaf_p.into_owned(), leaf_q.into_owned());
@@ -179,7 +179,7 @@ pub fn two_means_binary_quantized<D: Distance, NonBqDist: Distance, R: Rng>(
179179
// to move, we need to store it as f32. This requires us to convert every binary quantized
180180
// vectors to f32 vectors, but the recall suffers too much if we don't do it.
181181

182-
const ITERATION_STEPS: usize = 200;
182+
const ITERATION_STEPS: usize = 10;
183183

184184
let [leaf_p, leaf_q] = leafs.choose_two(rng)?.unwrap();
185185
let mut leaf_p: Leaf<'static, NonBqDist> = new_leaf(leaf_p.vector.to_vec());

0 commit comments

Comments
 (0)