Module Expr Str Import alias Import alias identifier ClassDef bases NameLoad body Expr Str Assign NameStore TupleLoad Str Str Str Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num Num body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If BoolOpOr CompareGt NameLoad Num CompareLt NameLoad Num body Raise Call NameLoad Str If CompareGt NameLoad Num body Raise Call NameLoad Str Assign NameStore BinOpSub BinOpLShift Num NameLoad Num Assign AttributeStore NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return BoolOpAnd CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call NameLoad Str If CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore BinOpDiv Call NameLoad NameLoad Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return BinOpDiv BinOpSub NameLoad NameLoad BinOpSub Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return SubscriptLoad Call AttributeLoad NameLoad attr Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad keyword AttributeLoad NameLoad attr For NameStore Call NameLoad NameLoad body Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Slice NameLoad BinOpAdd NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body AugAssignBitOr SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr BinOpLShift NameLoad BinOpMult BinOpSub BinOpSub NameLoad Num NameLoad NameLoad Assign NameStore BinOpAdd AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr AttributeStore NameLoad attr NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Num handlers ExceptHandler type NameLoad body Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr AttributeStore NameLoad attr NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr TupleLoad NameLoad keyword AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad NameLoad Assign NameStore BinOpSub BinOpLShift Num NameLoad Num For NameStore Call NameLoad NameLoad body Assign NameStore BinOpMult NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Slice NameLoad BinOpAdd NameLoad NameLoad body Assign NameStore BinOpBitAnd BinOpRShift SubscriptLoad NameLoad Index NameLoad BinOpMult BinOpSub BinOpSub NameLoad Num NameLoad NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index BinOpAdd NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareEq NameLoad Num body Return BinOpDiv Num BinOpLShift Num NameLoad Return BinOpDiv BinOpMult NameLoad BinOpPow BinOpSub Num NameLoad BinOpSub BinOpPow Num NameLoad Num BinOpSub Num BinOpPow BinOpSub Num NameLoad BinOpMult Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str If BoolOpAnd CompareEq NameLoad Num CompareEq NameLoad Num body Return TupleLoad NameLoad NameLoad Assign NameStore BinOpDiv Num BinOpAdd NameLoad NameLoad Assign NameStore BinOpMult BinOpAdd BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad NameLoad Assign NameStore BinOpMult BinOpAdd BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareEq NameLoad Num body Return Num If CompareEq NameLoad Num body Return Num If CompareLtE NameLoad Num body Return Num If CompareLtE NameLoad Num body Return Num If CompareLtE NameLoad Num body Return Num If CompareLtE NameLoad Num body Return Num Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad BinOpDiv BinOpMult NameLoad Num NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr BinOpDiv Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list decorator_list
N/A N/A 
This module implements the b-bit MinHash.
http://research.microsoft.com/pubs/120078/wfc0398-liPS.pdf

b-bit MinHash reduces storage space by storing only the b lowest bits
of each minimum hashed value, without significant loss of accuracy.
 N/A struct N/A numpy np bBitMinHash N/A object N/A N/A 
    The b-bit MinHash object
     N/A __slots__ N/A seed b r hashvalues N/A _serial_fmt_params <qBdi N/A _serial_fmt_block Q __init__ N/A N/A self minhash b r N/A 1 0.0 N/A N/A 
        Initialize a b-bit MinHash given an existing full MinHash
        object and parameter b - the number of bits to store for
        each minimum hashed values in the MinHash object.
         N/A b N/A int b N/A r N/A float r N/A N/A N/A b 32 N/A b 0 N/A N/A N/A ValueError b must be an integer in [0, 32] N/A N/A r 1.0 N/A N/A N/A ValueError r must be a float in [0.0, 1.0] N/A bmask N/A N/A 1 b 1 N/A N/A self hashvalues N/A N/A N/A N/A np bitwise_and N/A minhash hashvalues bmask astype N/A np uint32 N/A N/A self seed N/A minhash seed N/A N/A self b b N/A N/A self r r N/A __eq__ N/A N/A self other N/A N/A N/A 
        Check for full equality of two b-bit MinHash objects.
         N/A N/A N/A N/A self seed N/A other seed N/A N/A self b N/A other b N/A N/A self r N/A other r N/A N/A np array_equal N/A self hashvalues N/A other hashvalues N/A jaccard N/A N/A self other N/A N/A N/A 
        Estimate the Jaccard similarity (resemblance) between this b-bit
        MinHash and the other.
         N/A N/A N/A self b N/A other b N/A N/A N/A ValueError Cannot compare two b-bit MinHashes with different                    b values N/A N/A N/A self seed N/A other seed N/A N/A N/A ValueError Cannot compare two b-bit MinHashes with different                    set of permutations N/A intersection N/A N/A np count_nonzero N/A N/A self hashvalues N/A other hashvalues N/A raw_est N/A N/A float intersection N/A float N/A N/A self hashvalues size N/A a1 N/A N/A self _calc_a N/A self r N/A self b N/A a2 N/A N/A self _calc_a N/A other r N/A other b N/A N/A c1 c2 N/A N/A self _calc_c a1 a2 N/A self r N/A other r N/A N/A N/A raw_est c1 N/A 1 c2 N/A bytesize N/A N/A self N/A N/A N/A 
        Get the serialized size of this b-bit MinHash in number of bytes.
         N/A N/A N/A N/A self _bytesize N/A -1 N/A __getstate__ N/A N/A self N/A N/A N/A 
        This function is called when pickling the b-bit MinHash object.
        Returns a bytearray which will then be pickled.
         N/A N/A slot_size n num_blocks total N/A N/A self _bytesize N/A buffer N/A bytearray total N/A blocks N/A N/A np zeros N/A num_blocks dtype N/A np uint64 N/A i N/A range num_blocks N/A N/A start N/A i n N/A hvs N/A N/A self hashvalues N/A start N/A start n N/A N/A j hv N/A enumerate hvs N/A N/A N/A blocks N/A i N/A N/A np uint64 N/A hv N/A N/A N/A n 1 j slot_size N/A fmt N/A N/A self _serial_fmt_params N/A %d%s N/A num_blocks N/A self _serial_fmt_block N/A N/A N/A struct pack_into fmt buffer 0 N/A self seed N/A self b N/A self r N/A N/A self hashvalues size blocks N/A buffer N/A __setstate__ N/A N/A self buf N/A N/A N/A 
        This function is called when unpickling the b-bit MinHash object.
        Initialize the object with data in the buffer.
         N/A N/A N/A N/A N/A self seed N/A self b N/A self r num_perm N/A N/A struct unpack_from N/A self _serial_fmt_params buf 0 N/A N/A N/A TypeError N/A N/A N/A N/A self seed N/A self b N/A self r num_perm N/A N/A struct unpack_from N/A self _serial_fmt_params N/A buffer buf 0 N/A offset N/A N/A struct calcsize N/A self _serial_fmt_params N/A N/A self hashvalues N/A N/A np zeros N/A num_perm dtype N/A np uint32 N/A N/A slot_size n num_blocks total N/A N/A self _bytesize N/A fmt N/A %d%s N/A num_blocks N/A self _serial_fmt_block N/A N/A N/A blocks N/A N/A struct unpack_from fmt buf offset N/A N/A N/A TypeError N/A N/A blocks N/A N/A struct unpack_from fmt N/A buffer buf offset N/A mask N/A N/A 1 slot_size 1 N/A i N/A range num_blocks N/A N/A start N/A i n N/A N/A j _ N/A enumerate N/A N/A self hashvalues N/A start N/A start n N/A N/A hv N/A N/A N/A blocks N/A i N/A N/A N/A n 1 j slot_size mask N/A N/A N/A self hashvalues N/A N/A start j N/A N/A np uint32 hv N/A _calc_a N/A N/A self r b N/A N/A N/A 
        Compute the function A(r, b)
         N/A N/A r 0.0 N/A N/A N/A 1.0 N/A 1 b N/A N/A N/A r N/A N/A 1 r N/A N/A 2 b 1 N/A 1 N/A N/A 1 r N/A 2 b N/A _calc_c N/A N/A self a1 a2 r1 r2 N/A N/A N/A 
        Compute the functions C1 and C2
         N/A N/A N/A r1 0.0 N/A r2 0.0 N/A N/A N/A a1 a2 N/A div N/A 1 N/A r1 r2 N/A c1 N/A N/A N/A a1 r2 N/A a2 r1 div N/A c2 N/A N/A N/A a1 r1 N/A a2 r2 div N/A N/A c1 c2 N/A _find_slot_size N/A N/A self b N/A N/A N/A N/A b 1 N/A N/A 1 N/A N/A b 2 N/A N/A 2 N/A N/A b 4 N/A N/A 4 N/A N/A b 8 N/A N/A 8 N/A N/A b 16 N/A N/A 16 N/A N/A b 32 N/A N/A 32 N/A N/A ValueError Incorrect value of b N/A _bytesize N/A N/A self N/A N/A N/A block_size N/A N/A struct calcsize N/A self _serial_fmt_block N/A slot_size N/A N/A self _find_slot_size N/A self b N/A num_slots_per_block N/A int N/A N/A block_size 8 slot_size N/A num_blocks N/A int N/A N/A np ceil N/A N/A float N/A N/A self hashvalues size num_slots_per_block N/A total N/A N/A struct calcsize N/A N/A self _serial_fmt_params N/A %d%s N/A num_blocks N/A self _serial_fmt_block N/A N/A slot_size num_slots_per_block num_blocks total N/A N/A