杰卡德距离 [英] Jaccard Distance
问题描述
我有这样的问题,在计算杰卡德距离的设置(位向量):
P1 = 10111;
P2 = 10011。
相交的尺寸= 3; (我们怎么能找到它?)
工会的大小= 4,(我们怎么能找到它?)
杰卡德相似度=(路口/联合)= 3/4。
杰卡德距离= 1 - (杰卡德相似性)=(1-3 / 4)= 1/4
但我不明白,我们怎么能找出交集和联盟的两个向量。
请帮我。
非常感谢。
相交的尺寸= 3; (我们怎么能找到它?)
P1与放大器的设置位量; P2 = 10011
工会的大小= 4,(我们怎么能找到它?)
P1的设置位的数量| P2 = 10111
矢量这里的意思是二进制数组,其中第i位的手段确实第i个元素present在此设置。
I have this problem in calculating Jaccard Distance for Sets (Bit-Vectors):
p1 = 10111;
p2 = 10011.
Size of intersection = 3; (How could we find it out?)
Size of union = 4, (How could we find it out?)
Jaccard similarity = (intersection/union) = 3/4.
Jaccard Distance = 1 – (Jaccard similarity) = (1-3/4) = 1/4.
But I don't understand how could we find out the "intersection" and "union" of the two vectors.
Please help me.
Thanks alot.
Size of intersection = 3; (How could we find it out?)
Amount of set bits of p1&p2 = 10011
Size of union = 4, (How could we find it out?)
Amount of set bits of p1|p2 = 10111
Vector here means binary array where i-th bit means does i-th element present in this set.
这篇关于杰卡德距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!