We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to experiment with the code in scala and wrote the following pieces as a test case
import com.liveramp.hyperminhash._ import java.util.ArrayList val sketch1 = new BetaMinHash() val sketch2 = new BetaMinHash() val set1 = (1 to 10000).map(_.toByte).toArray val set2 = (5000 to 15000).map(_.toByte).toArray sketch1.offer(set1) sketch2.offer(set2) val sketches = new ArrayList[BetaMinHash]() sketches.add(sketch1) sketches.add(sketch2) val combiner = BetaMinHashCombiner.getInstance(); val combined = combiner.intersectionCardinality(sketches);
combined gives me 0 while the actual result should be something around 5000. Am I doing something wrong here?
The text was updated successfully, but these errors were encountered:
this issue is fixed, I had a typo in my code. It's fixed by doing the following:
import com.liveramp.hyperminhash._ import java.util.ArrayList val sketch1 = new HyperMinHash(5, 2) val sketch2 = new HyperMinHash(5, 2) (1 to 10000).foreach (e=> sketch1.offer(e.toString().getBytes())) (5000 to 15000).foreach (e=> sketch2.offer(e.toString().getBytes())) sketch1.offer(set1) sketch2.offer(set2) val sketches = new ArrayList[HyperMinHash]() sketches.add(sketch1) sketches.add(sketch2) val combiner = HyperMinHashCombiner.getInstance(); val combined = combiner.intersectionCardinality(sketches);
Sorry, something went wrong.
No branches or pull requests
I'm trying to experiment with the code in scala and wrote the following pieces as a test case
combined gives me 0 while the actual result should be something around 5000. Am I doing something wrong here?
The text was updated successfully, but these errors were encountered: