Description
Typically feature hashing is done on strings, i.e. feature names (or in the case of raw feature indexes, either the string representation of the numerical index can be used, or the index used "as-is" and not hashed).
It is common to use a well-distributed hash function such as MurmurHash3. This is the case in e.g. Scikit-learn.
Currently Spark's HashingTF uses the object's hash code. Look at using MurmurHash3 (at least for String which is the common case).
Attachments
Issue Links
- duplicates
-
SPARK-10574 HashingTF should use MurmurHash3
- Resolved