MCPcopy Create free account
hub / github.com/BirolLab/RNA-Bloom / getFPR

Method getFPR

src/rnabloom/bloom/CountingBloomFilter.java:253–263  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

251 }
252
253 @Override
254 public float getFPR() {
255 /* (1 - e(-kn/m))^k
256 k = num hash
257 m = size
258 n = pop count
259 */
260
261 popcount = counts.popCount();
262 return (float) pow((double)(popcount) / (double)(size), numHash);
263 }
264
265 public static long getExpectedSize(long expNumElements, float fpr, int numHash) {
266 double r = (double) (-numHash) / log(1 - exp(log(fpr) / (double) numHash));

Callers 4

saveMethod · 0.95
minimizerBasedMethod · 0.95
kmerBasedMethod · 0.95
strobemerBasedMethod · 0.95

Calls 1

popCountMethod · 0.45

Tested by

no test coverage detected