def jaccard(self, other):
if self.b != other.b:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if self.seed != other.seed:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>intersection = np.count_nonzero(self.hashvalues==other.hashvalues)<EOL>raw_est = float(intersection) / float(self.hashvalues.size)<EOL>a1 = self._calc_a(self.r, self.b)<EOL>a2 = self._calc_a(other.r, other.b)<EOL>c1, c2 = self._calc_c(a1, a2, self.r, other.r)<EOL>return (raw_est - c1) / (<NUM_LIT:1> - c2)<EOL>
Estimate the Jaccard similarity (resemblance) between this b-bit
MinHash and the other.