You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
right_index has an ever so slight bias to being chosen as 0, because when left_index == indices[-1] and right_index is also sampled as indices[-1], it will be "overflowed" to 0.
No, I think you are correct. This should probably be fine for large indices, but when you get low in the tree perhaps it could actually come into play? Thanks for pointing this out; I'll have to see if I can run some small experiments and see if it is worth trying to fix this up.
In
euclidean_random_projection_split
, this part of the code is picking two random points to form the hyperplane:pynndescent/pynndescent/rp_trees.py
Lines 221 to 224 in db258ce
right_index
has an ever so slight bias to being chosen as 0, because whenleft_index == indices[-1]
andright_index
is also sampled asindices[-1]
, it will be "overflowed" to 0.If
right_index
was selected as:then the bias is removed and there is no need for the
right_index = right_index % indices.shape[0]
-- I think?This also affects the angular and sparse variants, but I assume this doesn't really matter. I am mainly asking to make sure I didn't miss something.
The text was updated successfully, but these errors were encountered: