Method of dimension reduction in which closer items have greater probability of being mapped to the same hash bucket