GithubHelp home page GithubHelp logo

bloomfilter's Introduction

1. Implementation of BloomFilter

The implementation of the project entirely was done in python. I used jenkins hash implementation as base hash function. In addition, I wrote another wrapper class for HashFunction which uses jenkins hash function as base and it takes 2 additional random parameters to differentiate each instance of the HashFunction class. I designed and implemented another BloomFilter class which takes M and K values in its constructor and use that wrapped HashFunction class to generate different K number of hash functions in the class. M is used to set the size of the Bit Vector. In its constructor, all bits in the bit vector initialized to False at first.

BloomFilter class has 2 methods insert and check. Insert method takes a value as a parameter and hash the value through all K number of different hash functions. Set true to all indexes after that. However, check method basically hash the value again through hash functions and check if all set to True. If any of them set to False, it will return false otherwise True.

I implemented another class Experiment which basically takes B , N , M ,K values.

B is for number of iterations N is for number of items to be added M is for Bit vector size K is for number of hash functions.

In this sense, by setting these parameters in Experiment class, the class itself will do the rest as following

  • The experiment class sets constructor fields to its private properties.
  • It has make_experiment method to perform experiment with given parameters.
  • In make_experiment method, it will loop through B times , sum each result for the experiment with different hash functions and in the end, it will divide the sum by B again.

Jenkin's hash implementation is taken from http://stackoverflow.com/questions/3279615/python-implementation-of-jenkins-hash

2. Experiments.

2.1 Number of Vector size VS False Positive Probability with constant number of HashFunctions

alt tag alt tag

2.2 Number of Hash Functions VS False Positive Probability with constant number of Vector Size

alt tag alt tag

bloomfilter's People

Contributors

m00dy avatar

Stargazers

Aslan avatar Jaideep Singh avatar  avatar  avatar Matthew DeMichele avatar 今夜睡火星 avatar  avatar Gargi Mahale avatar Jinsan KIM avatar Ravi Singh avatar  avatar Nguyễn Tiến Đồng avatar  avatar  avatar  avatar  avatar Yusuke Ueno avatar Meteor avatar Michelangelo D'Agostino avatar Vito huang avatar L Mwangi avatar Ammaar Esmailjee avatar Dmitry Kulikov avatar  avatar Sebastian Trif avatar Travis avatar theophoric avatar Mihail Andreev avatar Farzad Battiwalla avatar Kitsion avatar Arun Sori avatar Zhipeng Huang avatar jiangplus avatar Kevin McAlear avatar Michael Gaffney avatar Subhash Ramesh avatar  avatar salotz avatar Bogdan Barna avatar Andrew Weeks avatar  avatar  avatar Luke Meyers avatar Jeremy Brayton avatar yash avatar Pedro Pereira avatar Mike Reeves avatar  avatar Michael Recachinas avatar Nathan Jaremko avatar Ali Demiroz avatar Sudarshan (Sid) avatar Michael Curry avatar Joel Jacobson avatar Miki Oracle avatar  avatar Jürgen Hermann avatar Afshin Mehrabani avatar  avatar Manas Karekar avatar David Morris avatar SC avatar David Cox avatar Apoorv Gupta avatar  avatar Miikka Liukkonen avatar Ian Channing avatar Jeremy Stober avatar  avatar seclorum avatar Andy Davies avatar João Alves avatar Mourad avatar Dmitriy Kamish avatar  avatar hamlet avatar Lukas Šalkauskas avatar Stan Chollet avatar  avatar Stefaney Roberts avatar J. J. Knudsen avatar Uday R Sawant avatar  avatar  avatar Pavlos Ratis avatar Rick Wong avatar Arunkumar Dhananjayan avatar Mickael van der Beek avatar  avatar LY Cheng avatar Qasim Maqbool avatar Jaimy Emmanuel avatar Philip avatar Drew Miller avatar Jijoe Vurghese avatar Ruben avatar  avatar Daniel Pink avatar Amir Amazigh BOUBEKKI avatar Nikolay Kolev avatar

Watchers

Dennis Kergl avatar Zhipeng Huang avatar Ritesh H Shukla avatar  avatar Thiago Nóbrega avatar Mengjun Liu avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.