Module Expr Str Import alias alias Import alias identifier Import alias identifier ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Expr Str If Call NameLoad NameLoad NameLoad body Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Lambda arguments args NameParam defaults SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Lambda arguments args NameParam defaults ListComp NameLoad comprehension NameStore Call AttributeLoad AttributeLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad attr attr orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body If Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad body Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Lambda arguments args NameParam defaults SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad orelse Print Str Print BinOpMod Str Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Expr Call AttributeLoad NameLoad attr Num orelse Print BinOpMod Str Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad If NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword Num keyword Num keyword Num keyword NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body For NameStore NameLoad body Expr TupleLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str Num body Expr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str Call NameLoad AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Str body For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad orelse For NameStore Call NameLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpMult Call NameLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad BinOpDiv BinOpMult NameLoad Num NameLoad NameLoad Assign NameStore ListLoad For TupleStore NameStore NameStore NameLoad body If CompareEq NameLoad NameLoad body Continue If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad If CompareGt NameLoad NameLoad body If CompareLt NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad If CompareLt NameLoad NameLoad body If CompareLt NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad If CompareLt NameLoad NameLoad body If CompareLt NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad If CompareGt NameLoad NameLoad body If CompareLt NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad If CompareGt NameLoad NameLoad body If CompareLt NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad orelse Print Str NameLoad Raise NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str Num body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad NameLoad If CompareGt NameLoad Num body Print BinOpMod Str NameLoad Assign NameStore ListLoad For NameStore NameLoad body If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad If CompareGt NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad If CompareGt NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad orelse Print Str NameLoad Raise NameLoad If CompareGt NameLoad Num body Print BinOpMod Str TupleLoad Call NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Str Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore ListLoad For TupleStore NameStore NameStore SubscriptLoad NameLoad Slice NameLoad body Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str body Expr Str Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Num orelse Expr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore BinOpDiv Call NameLoad ListComp SubscriptLoad NameLoad Index Num comprehension NameStore SubscriptLoad NameLoad Slice NameLoad Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore NameLoad Assign NameStore BinOpAdd Call NameLoad Num BinOpAdd Call NameLoad NameLoad Num ListLoad Num For NameStore Call NameLoad Call NameLoad NameLoad body Assign TupleStore NameStore NameStore NameStore TupleLoad NameLoad NameLoad BinOpAdd BinOpMult ListLoad Num Call NameLoad NameLoad ListLoad BinOpAdd NameLoad Num For NameStore Call NameLoad Call NameLoad NameLoad body Assign NameStore BinOpAdd SubscriptLoad NameLoad Index NameLoad Num Assign NameStore BinOpAdd SubscriptLoad NameLoad Index BinOpSub NameLoad Num Num Assign NameStore BinOpAdd SubscriptLoad NameLoad Index BinOpSub NameLoad Num CompareNotEq SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad NameLoad NameLoad Return SubscriptLoad NameLoad Index BinOpSub Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return BinOpSub Num BinOpDiv Call AttributeLoad NameLoad attr NameLoad NameLoad Call NameLoad Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return BinOpSub Num BinOpDiv Call AttributeLoad NameLoad attr NameLoad NameLoad Call NameLoad Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad Assign NameStore NameLoad Assign NameStore BinOpAdd Call NameLoad Num BinOpAdd Call NameLoad NameLoad Num ListLoad Num For NameStore Call NameLoad Call NameLoad NameLoad body Assign TupleStore NameStore NameStore NameStore TupleLoad NameLoad NameLoad BinOpAdd BinOpMult ListLoad Num Call NameLoad NameLoad ListLoad BinOpAdd NameLoad Num For NameStore Call NameLoad Call NameLoad NameLoad body Assign NameStore BinOpSub Num BinOpDiv Call NameLoad NameLoad NameLoad NameLoad Assign NameStore BinOpAdd SubscriptLoad NameLoad Index NameLoad NameLoad Assign NameStore BinOpAdd SubscriptLoad NameLoad Index BinOpSub NameLoad Num NameLoad Assign NameStore BinOpAdd SubscriptLoad NameLoad Index BinOpSub NameLoad Num BinOpMult CompareNotEq SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad NameLoad NameLoad Return SubscriptLoad NameLoad Index BinOpSub Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Return BinOpDiv Call NameLoad Call AttributeLoad NameLoad attr NameLoad Call NameLoad Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad decorator_list decorator_list FunctionDef arguments args defaults body Import alias Assign NameStore ListLoad ListLoad Str Str Str Str ListLoad Str Str Str Str ListLoad Str Str Str Str ListLoad Str Str Str Str ListLoad Str Str Str Str ListLoad Str Str Str ListLoad Str Str Str Str Str ListLoad Str Str Str ListLoad Str Str Str Assign NameStore Dict Str Str Str Str Num Num Num NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Num Print Str Expr Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index Num keyword NameLoad For NameStore NameLoad body Print BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index Num Print Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad Str Str Str Str Expr Call AttributeLoad NameLoad attr NameLoad Print Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad Str Str Str Str NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A 
    LSHSimilarities: Compute similarity between a large set of items using
                     Locality Sensitive Hashing (LSH). Specifically we're
                     employing Banded Min-Hash.

    Unlike conventional hash functions the goal of LSH is to maximize probability
    of "collision" of similar items rather than avoid collisions.

    - http://en.wikipedia.org/wiki/MinHash
    - http://en.wikipedia.org/wiki/Locality_sensitive_hashing
    - Mining of Massive Datasets(Chap 3) http://infolab.stanford.edu/~ullman/mmds/ch3.pdf

    Use Banded LSH to reduce pairwise similarity calcs.
    Right now support three distance metrics
        1) Jaccard Index (set based)  -- jaccard
        2) Levenshtein Similarity (order matters)  -- levenshtein
        3) Levenshtein Distance (experimental: order matters)  -- levenshtein_D

    Usage:
        import lsh_similarity as lsim
        my_sim = lsim.LSHSimilarities(records, mh_params=None)
            Input: records - a list of records (each record is a list of sparse features)
                   mh_params - a dictionary of parameters for min_hash see MinHash()
        sim_list = my_sim.batch_compute_similarities(distance_metric='jaccard', threshold=0.5)
            Output: Similarities - a tuple (source, target, sim)
 N/A os sys N/A data_hacking.min_hash min_hash N/A pandas pd LSHSimilarities N/A N/A N/A 
    Use Banded LSH to reduce pairwise similarity calcs.
    Right now support three distance metrics
        1) Jaccard Index (set based)  -- jaccard
        2) Levenshtein Similarity (order matters) -- levenshtein
        3) Levenshtein Distance (experimental: order matters) -- levenshtein_D
     __init__ N/A N/A self records mh_params verbose N/A None False N/A N/A  Init for LSHSimilarities.  N/A  Trying to support python list, pandas DataFrames and pandas Series.  N/A N/A isinstance records list N/A N/A N/A self _record_type list N/A N/A self _get_row N/A N/A N/A index N/A N/A N/A self _records N/A index N/A N/A N/A isinstance records N/A pd DataFrame N/A N/A N/A self _record_type dataframe N/A N/A self _get_row N/A N/A N/A index N/A N/A x N/A x N/A N/A N/A N/A N/A N/A self _records iloc N/A index values tolist N/A N/A N/A isinstance records N/A pd Series N/A N/A N/A isinstance N/A N/A records iloc N/A 0 list N/A N/A N/A self _record_type series N/A N/A self _get_row N/A N/A N/A index N/A N/A N/A N/A self _records iloc N/A index N/A N/A A Series must be a series of lists N/A N/A instead got a series of %s N/A type N/A N/A records iloc N/A 0 N/A N/A N/A sys exit 1 N/A N/A N/A Unknown records type for LSHSimilarities(): %s N/A type records N/A N/A N/A sys exit 1 N/A N/A self _records records N/A mh_params N/A N/A N/A self _min_hash N/A N/A min_hash MinHash mh_params N/A N/A N/A self _min_hash N/A N/A min_hash MinHash num_hashes 20 lsh_bands 5 lsh_rows 4 drop_duplicates True N/A N/A self verbose verbose N/A vprint N/A N/A self args N/A N/A N/A N/A self verbose N/A N/A a args N/A N/A N/A N/A N/A N/A sys stdout write a N/A N/A N/A N/A sys stdout write N/A batch_compute_similarities N/A N/A self distance_metric threshold N/A jaccard 0.5 N/A N/A 
        Use Banded LSH to reduce pairwise similarity calcs.
        Right now support three distance metrics
            1) Jaccard Index (set based)  -- jaccard
            2) Levenshtein Similarity (order matters)  -- levenshtein
            3) Levenshtein Distance (experimental: order matters) -- levenshtein_D
         N/A N/A N/A self vprint N/A Adding %d samples to minhash... N/A len N/A self _records N/A N/A N/A self _record_type list N/A N/A N/A uuid record N/A enumerate N/A self _records N/A N/A N/A N/A N/A self _min_hash add_instance uuid record N/A N/A uuid N/A xrange N/A N/A N/A self _records shape N/A 0 N/A N/A N/A N/A N/A self _min_hash add_instance uuid N/A N/A self _get_row uuid N/A N/A N/A self vprint Computing All Candidate Matches... N/A N/A N/A N/A self _min_hash compute_all_candidate_matches N/A candidates N/A N/A N/A self _min_hash get_candidate_pairs N/A n_pairs N/A len candidates N/A total_pairs N/A N/A len N/A self _records N/A len N/A self _records N/A N/A N/A self vprint N/A %d (%.2f%% out of %d) pairs returned from MinHash N/A n_pairs N/A N/A n_pairs 100.0 total_pairs total_pairs N/A matches N/A N/A N/A source target candidates N/A N/A N/A source target N/A N/A N/A N/A distance_metric levenshtein N/A N/A sim N/A N/A self l_sim N/A N/A self _get_row source N/A N/A self _get_row target N/A N/A sim threshold N/A N/A N/A source target N/A N/A N/A N/A matches append N/A sim source target N/A N/A N/A N/A matches append N/A sim target source N/A N/A N/A distance_metric levenshtein_D N/A N/A distance N/A N/A self levenshtein N/A N/A self _get_row source N/A N/A self _get_row target N/A N/A distance threshold N/A N/A N/A source target N/A N/A N/A N/A matches append N/A distance source target N/A N/A N/A N/A matches append N/A distance target source N/A N/A N/A distance_metric levenshtein_tapered N/A N/A distance N/A N/A self levenshtein_tapered N/A N/A self _get_row source N/A N/A self _get_row target N/A N/A distance threshold N/A N/A N/A source target N/A N/A N/A N/A matches append N/A distance source target N/A N/A N/A N/A matches append N/A distance target source N/A N/A N/A distance_metric l_tapered_sim N/A N/A sim N/A N/A self l_tapered_sim N/A N/A self _get_row source N/A N/A self _get_row target N/A N/A sim threshold N/A N/A N/A source target N/A N/A N/A N/A matches append N/A sim source target N/A N/A N/A N/A matches append N/A sim target source N/A N/A N/A distance_metric jaccard N/A N/A sim N/A N/A self jaccard_sim N/A N/A self _get_row source N/A N/A self _get_row target N/A N/A sim threshold N/A N/A N/A source target N/A N/A N/A N/A matches append N/A sim source target N/A N/A N/A N/A matches append N/A sim target source N/A N/A Unknown distance metric distance_metric N/A NotImplementedError N/A N/A N/A self vprint N/A LSH: %s matches out of %s candidates (adjust parameters if needed) N/A N/A len matches N/A len candidates N/A matches N/A similarity_query N/A N/A self query_item distance_metric threshold N/A jaccard 0.1 N/A N/A 
        Use Banded LSH to reduce the number of candidates.
        Right now support two distance metrics
            1) Jaccard Index (set based)  -- jaccard
            2) Levenshtein Similarity (order matters)  -- levenshtein
         N/A candidates N/A N/A N/A self _min_hash candidate_query query_item N/A n_pairs N/A len candidates N/A N/A n_pairs 5000 N/A N/A N/A Warning: %d candidates returned from MinHash n_pairs N/A matches N/A N/A target candidates N/A N/A N/A distance_metric levenshtein N/A N/A sim N/A N/A self l_sim query_item N/A N/A self _get_row target N/A N/A sim threshold N/A N/A N/A N/A matches append N/A sim target N/A N/A N/A distance_metric jaccard N/A N/A sim N/A N/A self jaccard_sim query_item N/A N/A self _get_row target N/A N/A sim threshold N/A N/A N/A N/A matches append N/A sim target N/A N/A Unknown distance metric distance_metric N/A NotImplementedError N/A N/A n_pairs 5000 N/A N/A N/A LSH: %s matches out of %s candidates (adjust parameters if needed) N/A N/A len matches n_pairs N/A matches N/A top_N N/A N/A self query_item labels N distance_metric threshold N/A jaccard 0.1 N/A N/A 
                This is a convenience methods that shows the label data for the
                top N matches against a similarity_query
             N/A matches N/A N/A self similarity_query query_item distance_metric threshold N/A N/A N/A matches sort reverse True N/A matches_data N/A N/A N/A sim index N/A matches N/A N N/A N/A N/A N/A matches_data append N/A sim label sim N/A labels N/A index N/A matches_data N/A top_sims_deprecated N/A N/A self query_list N distance_metric N/A jaccard N/A N/A 
                This is a convenience methods that returns the highest sim
                for the query_item.
             N/A output_sims N/A N/A query_item query_list N/A N/A matches N/A N/A self similarity_query query_item distance_metric N/A N/A matches N/A N/A N/A N/A output_sims append 0.0 N/A N/A N/A N/A matches sort reverse True N/A agg_sims N/A N/A sum N/A N/A x N/A 0 N/A x N/A matches N/A N N/A float N N/A N/A N/A output_sims append agg_sims N/A output_sims N/A levenshtein N/A N/A self seq1 seq2 N/A N/A N/A  Compute Levenshtein distance between two sequences (strings/lists)
            Note: This is based on a code snippet from Michael Homer
                  http://mwh.geek.nz/2009/04/26/python-damerau-levenshtein-distance  N/A oneago None N/A thisrow N/A N/A range 1 N/A N/A len seq2 1 N/A 0 N/A x N/A xrange N/A len seq1 N/A N/A N/A _twoago oneago thisrow N/A oneago thisrow N/A N/A N/A 0 N/A len seq2 N/A N/A x 1 N/A y N/A xrange N/A len seq2 N/A N/A delcost N/A N/A oneago N/A y 1 N/A addcost N/A N/A thisrow N/A N/A y 1 1 N/A subcost N/A N/A oneago N/A N/A y 1 N/A N/A seq1 N/A x N/A seq2 N/A y N/A N/A thisrow N/A y N/A min delcost addcost subcost N/A N/A thisrow N/A N/A N/A len seq2 1 N/A l_sim N/A N/A self seq1 seq2 N/A N/A N/A  Compute similarity between two sequences using Levenshtein distance  N/A N/A 1.0 N/A N/A N/A self levenshtein seq1 seq2 N/A float N/A max N/A len seq1 N/A len seq2 N/A l_tapered_sim N/A N/A self seq1 seq2 N/A N/A N/A  Compute similarity between two sequences using Levenshtein distance  N/A N/A 1.0 N/A N/A N/A self levenshtein_tapered seq1 seq2 N/A float N/A max N/A len seq1 N/A len seq2 N/A levenshtein_tapered N/A N/A self seq1 seq2 N/A N/A N/A  Compute Levenshtein distance between two sequences (strings/lists)
            with a taper of costs as you progress down the sequence  N/A max_len N/A float N/A max N/A len seq1 N/A len seq2 N/A oneago None N/A thisrow N/A N/A range 1 N/A N/A len seq2 1 N/A 0 N/A x N/A xrange N/A len seq1 N/A N/A N/A _twoago oneago thisrow N/A oneago thisrow N/A N/A N/A 0 N/A len seq2 N/A N/A x 1 N/A y N/A xrange N/A len seq2 N/A N/A taper N/A 1.0 N/A N/A min x y max_len N/A delcost N/A N/A oneago N/A y taper N/A addcost N/A N/A thisrow N/A N/A y 1 taper N/A subcost N/A N/A oneago N/A N/A y 1 N/A N/A N/A seq1 N/A x N/A seq2 N/A y taper N/A N/A thisrow N/A y N/A min delcost addcost subcost N/A N/A thisrow N/A N/A N/A len seq2 1 N/A jaccard_sim N/A N/A self features1 features2 N/A N/A N/A  Compute similarity between two sets using Jaccard similarity  N/A set1 N/A set features1 N/A set2 N/A set features2 N/A N/A N/A len N/A N/A set1 intersection set2 N/A float N/A max N/A len set1 N/A len set2 N/A N/A _test N/A N/A N/A N/A N/A pprint N/A my_data N/A N/A a b c d N/A a b c e N/A z b c d N/A a b e d N/A w x y z N/A x y z N/A w x q z y N/A r s t N/A u s t N/A params N/A num_hashes lsh_bands lsh_rows drop_duplicates 20 20 1 True N/A lsh N/A LSHSimilarities my_data mh_params params N/A sims N/A N/A lsh batch_compute_similarities distance_metric l_tapered_sim threshold 0 N/A All similarity pairs N/A N/A N/A sims sort key N/A N/A N/A x N/A N/A x N/A 0 reverse True N/A sim sims N/A N/A N/A (%f)
%s
%s
 N/A N/A sim N/A 0 N/A my_data N/A N/A sim N/A 1 N/A my_data N/A N/A sim N/A 2 N/A Query on [x,y,z,h] N/A matches N/A N/A lsh similarity_query N/A x y z h N/A N/A N/A pprint pprint matches N/A Top 5 on [x,y,z,h] N/A top_5 N/A N/A lsh top_N N/A x y z h my_data 5 N/A N/A N/A pprint pprint top_5 N/A N/A N/A __name__ __main__ N/A N/A N/A _test