'Implements a space-efficient probabilistic data structure that
grows as more items are added while maintaining a steady false
positive rate
initial_capacity
the initial capacity of the filter
error_rate
the error_rate of the filter returning false positives. This
determines the filters capacity. Going over capacity greatly
increases the chance of false positives.
mode
can be either ScalableBloomFilter.SMALL_SET_GROWTH or
ScalableBloomFilter.LARGE_SET_GROWTH. SMALL_SET_GROWTH is slower
but uses less memory. LARGE_SET_GROWTH is faster but consumes
memory faster.'

def __init__(self, initial_capacity=15000, error_rate=1e-05, mode=SMALL_SET_GROWTH, filter_impl=BloomFilter):

    if ((not error_rate) or (error_rate < 0)):
        raise ValueError('Error_Rate    must    be    a    decimal    less    than    0.')
    self.filter_impl = filter_impl
    self.scale = mode
    self.ratio = 0.9
    self.initial_capacity = initial_capacity
    self.error_rate = error_rate
    self.filters = []
