Documentation of 'smile.neighbor.SNLSH' Java class
SNLSH
smile.neighbor

Class SNLSH<E>

  • All Implemented Interfaces:
    KNNSearch<SNLSH.AbstractSentence,E>, NearestNeighborSearch<SNLSH.AbstractSentence,E>, RNNSearch<SNLSH.AbstractSentence,E>


    public class SNLSH<E>
    extends java.lang.Object
    implements NearestNeighborSearch<SNLSH.AbstractSentence,E>, KNNSearch<SNLSH.AbstractSentence,E>, RNNSearch<SNLSH.AbstractSentence,E>
    Locality-Sensitive Hashing for Signatures. LSH is an efficient algorithm for approximate nearest neighbor search in high dimensional spaces by performing probabilistic dimension reduction of data. The basic idea is to hash the input items so that similar items are mapped to the same buckets with high probability (the number of buckets being much smaller than the universe of possible input items). To avoid computing the similarity of every pair of sets or their signatures. If we are given signatures for the sets, we may divide them into bands, and only measure the similarity of a pair of sets if they are identical in at least one band. By choosing the size of bands appropriately, we can eliminate from consideration most of the pairs that do not meet our threshold of similarity.

    By default, the query object (reference equality) is excluded from the neighborhood. You may change this behavior with setIdenticalExcluded. Note that you may observe weird behavior with String objects. JVM will pool the string literal objects. So the below variables String a = "ABC"; String b = "ABC"; String c = "AB" + "C"; are actually equal in reference test a == b == c. With toy data that you type explicitly in the code, this will cause problems. Fortunately, the data would be read from secondary storage in production.

    References

    1. Moses S. Charikar. Similarity Estimation Techniques from Rounding Algorithms
    See Also:
    LSH

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.