Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在实施 min-hash 来比较两个文本文档。我为两个文档创建了长度为 128 的向量,但由于随机数,每次重新执行代码时,我都会得到不同的 Jaccard 相似性。那么我怎样才能每次都得到相同的 Jaccard 相似度呢?是的,我不能使用种子来重现随机数。
我使用的 Minhash 公式是 h(x) = (a * val + b) % prime Random Hash Eq 系数 a 和 b 是随机选择的小于 x 最大值的整数。c 是一个比 x 的最大值稍大的素数。