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)
| 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 | ''' |
| 203 | k = len(self) |
| 204 | return float(k) / np.sum(self.hashvalues / float(_max_hash)) - 1.0 |
| 205 | |
| 206 | def merge(self, other): |
| 207 | '''Merge the other MinHash with this one, making this one the union |
no outgoing calls
no test coverage detected