搜尋

首頁  >  問答  >  主體

python3 怎么计算汉明距离或余弦哈希感知算法

['ff8f81c1c1c18181', '3c180c0c8cfbe3e7', 'ff8f818581c18181', 'ff8f818181cd8181', 'ff8f818f81c18181', '9f0007070f0f0f1f', 'ff8781e1c1c18181', 'ff8781e1c1c18181', 'ff8781e1c1c18181', 'ff8781e1c1c18181', 'ff8781e1c1c18181', 'ff8781e1c1c18181', 'ff8781e1c1c18181', 'ff8781e1c1c18181', 'ff8f81c1c9c18181', '1f0c0e0c0fc3e3e7', '0f0707070f0e0f0f', 'bf8f818f8f8f0f8f', 'ff8fa1e1c1c18181', 'ff8f818581c18181', 'ff8f81818f8f8181', 'ff8781c9c9c98181', 'ff8f818f89818181', 'ff8f81c1c1c18181', 'ff8f818f89818181', 'ff87818f89818181', 'ff8f818181c18181', 'ff8f81c989c98181', 'ff83818383c38181', 'ff878187878f8181', '1e0c0c0cf6e3e1f3', '8f0f0f0f8f8f0f0f', '1f090c0c8ee7c7ef', 'fff9f1f1e10119db', '1f07060418f8f3f3', '8f858181818181bf', 'fff9f9f1818180d1', '1f0f0f0f0f80f1e7', 'fff9f9f1818180d1', 'fff9f9f1818180d1', '0707070704f0e1e3', '1f1c18181bc3c7ef', 'ff8fa1e1c1c181b1', '3f0f0c0008f8f8fc', '1e0c0c0c0cf3e3e7', '3f0f0f0c8cf8f8fc', '2f070f0f050101ef', '3f0f0c0008f8f8fc', '1f0f0d0000f8f8fc', 'fffdf1c00103cfff', '0707070707f0e1e7', 'ffe3813c00c3ffff', '9f878181818181bf', 'fff9f9f1818180d1', '1f090c0c8ee7c7ef', 'fffef88080f1ffff', 'fffdf1c00103cfff', '1f0f0f0f0f80f1e7', 'fef9f38400e1f7ff', 'f0e2ee9e9d3939fb', '060604050df1e1ed', '0707070707f0e1e7', 'e7c3c7e7e7e3e3e7', '1f08080c8ee7c7ef', 'fff9f9f1e10119d9', '0707070700f8f9ff', '0707070707f0e1e7', 'fff9f9f1810119d9', 'db8100818d9f8fdf', 'db8100818d9f8fdf', '8181c1e1f1818183', '3f070707070101ef', '391808989898908f', 'eff1f1f1f1f1f1e7', 'fff1f1f1f1f1f1ff', 'ff87f7c787878787', '3f0f0c0808ccf8fc', '8181c1e1f1818183', '3f070707070101ef', '391808989898908f', 'eff1f1f1f1f1f1e7', 'fff1f1f1f1f1f1ff', 'ff919181818181ff', 'ffd1f1f1f1f1f1ff', 'ff919181818181ff', 'ffd1f1f1f1f1f1ff', 'bf918181818181ff', 'fff48080808081bf', '9f8381818181819f', '3f0f0c0808ccf8fc', 'ff87f7c787878787', '8181c1e1f1818183', '3f070707070101ef', '391808989898908f', 'eff1f1f1f1f1f1e7', 'fff1f1f1f1f1f1ff', 'ff919181818181ff', 'ffd1f1f1f1f1f1ff', 'ff919181818181ff', 'ffd1f1f1f1f1f1ff', 'bf918181818181ff', 'fff48080808081bf', '9f8381818181819f', '3f0f0c0808ccf8fc', 'ff919181818181ff', 'ffd1f1f1f1f1f1ff', 'ff919181818181ff', 'bf918181818181ff', 'fff48080808081bf', '3f0f0c0808ccf8fc', '8181c1e1f1818183', '3f070707070101ef', '391808989898908f', 'ff919181818181ff', 'ffd1f1f1f1f1f1ff', 'ff919181818181ff', 'ffd1f1f1f1f1f1ff']

Hash 值列表

用 1e0c0c0cf6e3e1f3 去遍历以上列表

怎么计算最短的距离(主要)

然后全部按数值最小的顺序排列(次要)

汉明距离 或 余弦哈希感知算法
或者用其他方法也行

黄舟黄舟2785 天前792

全部回覆(0)我來回復

無回覆
  • 取消回覆