MCPcopy Create free account
hub / github.com/BIT-DataLab/LakeBench / count

Method count

join/LSH/datasketch/minhash.py:196–204  ·  view source on GitHub ↗

Estimate the cardinality count based on the technique described in `this paper `_. Returns: int: The estimated cardinality of the set represented by this MinHash.

(self)

Source from the content-addressed store, hash-verified

194 float(len(self))
195
196 def count(self):
197 '''Estimate the cardinality count based on the technique described in
198 `this paper <http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=365694>`_.
199
200 Returns:
201 int: The estimated cardinality of the set represented by this MinHash.
202 ''&#x27;
203 k = len(self)
204 return float(k) / np.sum(self.hashvalues / float(_max_hash)) - 1.0
205
206 def merge(self, other):
207 ''&#x27;Merge the other MinHash with this one, making this one the union

Callers 11

expandQueryFunction · 0.80
expandQueryFunction · 0.80
expandQueryFunction · 0.80
minhash_multi_processFunction · 0.80
async_funcMethod · 0.80
async_funcMethod · 0.80
async_funcMethod · 0.80
async_funcMethod · 0.80
get_countsMethod · 0.80
get_countsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected