[MRG] Locality Sensitive Hashing for approximate nearest neighbor search(GSoC)

If you keep the space efficiency, then I just misunderstood your 
proposal, please ignore. Do consider also the time efficiency of the 
binary search, it also matters (though much less).

Ok, signing off for now.

On 10/22/2014 12:28 PM, jnothman wrote:
> In sklearn/neighbors/approximate.py:
>
>> +__all__ = ["LSHForest"]
>> +
>> +
>> +def _find_matching_indices(sorted_array, item, left_mask, right_mask):
>> +    """Finds indices in sorted array of integers.
>> +
>> +    Most significant h bits in the binary representations of the
>> +    integers are matched with the items' most significant h bits.
>> +    """
>> +    left_index = np.searchsorted(sorted_array, item & left_mask)
>> +    right_index = np.searchsorted(sorted_array, item | right_mask,
>> +                                  side='right')
>> +    return np.arange(left_index, right_index)
>> +
>> +
>> +def _find_longest_prefix_match(bit_string_array, query, hash_size,
>
> I don't understand your issue with the space consumption of a
> (fixed-length) string array, i.e. the exact same array we currently have
> with |.view(dtype='|S4')|.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/scikit-learn/scikit-learn/pull/3304/files#r19204757>.
>