scikit-learn/scikit-learn — pull request #564 by ogrisel (2012-01-17 01:52:48+00:00)
Title: MRG: Murmurhash cython utility wrapper

Here is a cython wrapper for the non cryptographic [murmurhash](https://code.google.com/p/smhasher/wiki/MurmurHash3) hash function ([Wikipedia entry](https://code.google.com/p/smhasher/wiki/MurmurHash3)).

This hash function is commonly used to implement feature hashing (as in Vowpal Wabbit and in Apache Mahout for instance). As far as I know it could also be useful to implement Bloom filters or Count Min Sketch for instance.

I plan to use it both for the Random Projection branch (as an alternative to explicit sparse matrix allocation) and to implement a very scalable vocabulary-less text feature extractor.

An alternative would have been Google's [CityHash](https://code.google.com/p/cityhash/) which could be even faster but it's apparently less commonly used and its README mentions poor avalanching issue on small sized inputs (<=16 bytes) which is a very common case for feature hashing.