2

I tries to insert high number of longs to bloom filter and check them with low error. Constructor promise me expected percent for number of insertions, but after all inserts, new expected percent different and very high.

BloomFilter<Long> longBloomFilter = BloomFilter.create(Funnels.longFunnel(), 258112656, Math.pow(10, -8));
for (int i = 0; i < 258112656; i++) {
  longBloomFilter.put((long) i);
}
System.out.println(longBloomFilter.expectedFpp());

prints 0.17

I don't really trust, that bloom filter can give such great error rate, but why expectations before and after so different?

mishka
  • 2,027
  • 2
  • 20
  • 30
  • How, exactly did you choose the constant 258112656? When I do this same process for n = 10^8, I get a reasonable answer of 10^-8. – Louis Wasserman Feb 19 '15 at 21:18

1 Answers1

1

I strongly suspect you are using an outdated version of Guava. When I run your code with Guava 18.0, I get 1.001370499582369E-8, which is a perfectly reasonable output.

Louis Wasserman
  • 191,574
  • 25
  • 345
  • 413