Tanimoto系数距离测量(Tanimoto coefficient distance measure)

编程入门 行业动态 更新时间:2024-10-20 11:30:29
Tanimoto系数距离测量(Tanimoto coefficient distance measure)

可以将两个对象具有相同的余弦和Tanimoto系数距离度量,其中

Tanimoto distance measure, d(x,y) = x.y / (|x|*|x|) + (|y|*|y|)- x*y

cosine measure, d(x,y) = x.y /(|x|* |x|) * (|y| *|y|)

Can two objects have identical cosine and Tanimoto coefficient distance measure, where

Tanimoto distance measure, d(x,y) = x.y / (|x|*|x|) + (|y|*|y|)- x*y

and

cosine measure, d(x,y) = x.y /(|x|* |x|) * (|y| *|y|)

最满意答案

Tanimoto相似系数 ( 不是真正的距离测量)由下式定义

d(x,y) = x.y / ((|x|*|x|) + (|y|*|y|)- x.y)

对于位向量x和y。

现在将其与余弦相似系数进行比较,

d(x,y) = x.y / (|x| * |y|)

分母因xy项而异。 如果xy为零,则Tanimoto和余弦相似系数将相同。

几何上,当且仅当x和y垂直时, xy为零。

由于x和y是位向量(即每个维度中的值只能是0或1),因此xy等于零意味着

x1*y1 + x2*y2 + ... + xn*yn = 0

如果xi * yi = 1 * 1 = 1,那么整个总和将为正。 要使整个总和为零,则没有术语 xi * yi等于1.它们必须全部等于0:

所以

x1*y1 = 0 x2*y2 = 0 ... xn*yn = 0

换句话说,如果xi是1,那么yi必须是0,反之亦然。

因此,有很多例子,Tanimoto相似度等于余弦相似度:

x = (0,1,0,1) y = (1,0,0,0)

例如。

The Tanimoto similarity coefficient (which is not a true distance measure) is defined by

d(x,y) = x.y / ((|x|*|x|) + (|y|*|y|)- x.y)

for bit vectors x and y.

Now compare that with the cosine similarity coefficent,

d(x,y) = x.y / (|x| * |y|)

The denominators differ by a x.y term. The Tanimoto and cosine similarity coefficients would be the same if x.y is zero.

Geometrically, x.y is zero if and only if x and y are perpendicular.

Since x and y are bit vectors (i.e. whose values in each dimension can only be 0 or 1), x.y equalling zero means

x1*y1 + x2*y2 + ... + xn*yn = 0

If xi*yi = 1*1 = 1, then the whole sum would be positive. For the whole sum to be zero, no term xi*yi can equal 1. They must all equal 0:

So

x1*y1 = 0 x2*y2 = 0 ... xn*yn = 0

In other words, if xi is 1, then yi must be 0, and vice versa.

So there are tons of examples where the Tanimoto similarity is equal to the cosine similarity:

x = (0,1,0,1) y = (1,0,0,0)

for instance.

更多推荐

本文发布于:2023-04-28 02:09:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1329774.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:系数   测量   距离   Tanimoto   distance

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!