Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

ratio in ScalableBloomFilter #21

Open

Description

@ScottShao

Hi, I'm wondering why you are using ratio in ScalableBloomFilter, and it seems that the first filter has different error_as from the rest filters. Because in the code, the first filter has error rate as error_rate * (1 - ratio), and the rest of filters have error rate as error_rate * ratio.

Activity

  1. johnyf commented on May 15, 2016

    @johnyf

    It would be helpful if you provided links to specific lines in a specific commit of branch master.

  2. ScottShao commented on May 16, 2016

    @ScottShao
    Author

    https://github.com/jaybaird/python-bloomfilter/blob/master/pybloom/pybloom.py

    in line 365 and line 372, when you add a new filter into scalable filters, it seems you are using different error rate, for the first filter, the error rate is error_rate * (1 - ratio), while it's error_rate * ratio for the rest of filters.

  3. johnyf commented on May 16, 2016

    @johnyf

    Thanks for the additional information. When master branch changes, the above link will point to different lines. The reference can be made persistent with:

    filter = BloomFilter(

    and:
    filter = BloomFilter(

    that can also be written as line 365 and line 372.

    Please note that I am not the author of pybloom.

  4. ScottShao commented on May 16, 2016

    @ScottShao
    Author

    Thank you for the tips.

  5. joseph-fox commented on May 16, 2016

    @joseph-fox

    @ScottShao I think this version https://pypi.python.org/pypi/pybloom_live/2.1.0 addresses your concerns.

  6. ScottShao commented on May 17, 2016

    @ScottShao
    Author

    @joseph-fox Thank you for sharing the information. It seems that the only place that we use ratio is when we create a new filter, and we use ratio * error_rate as the error rate of new filter. If this is the case, I don't think we need the parameter ratio any more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions