Vowpal Wabbit - 它是如何散列的

Vowpal Wabbit - how it does hashing

谁能解释一下 VW 中的散列技巧是如何进行的?具体来说,下面的描述,来自要点:

the default is hashing / projecting feature names to the machine architecture unsigned word using a variant of the murmurhash v3 (32-bit only) algorithm which then is ANDed with (2^k)-1 (ie it is projected down to the first k lower order bits with the rest 0'd out).

提到散列的结果是 'ANDed' 和 (2^k)-1。这是什么意思?我知道如果散列是 mod 某个数字 D (hash('my string')%D),它会产生一个只能采用 D 值的新数字。这与 AND'ed 相同吗?如果是这样,它究竟是如何工作的?

(2^k)-1 在二进制中是 "k ones",例如(2^6)-1 = 111111(二进制)。当您在原始哈希值和 (2^k)-1 上应用 logical AND 时,您实际上只获取了哈希值的 k 个低位。它与 mod 2^k.

相同的操作