谷本系数距离测度

谷本系数距离测度

本文介绍了谷本系数距离测度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

两个对象可以具有相同的余弦和Tanimoto系数距离测度吗,

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

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

推荐答案

Tanimoto相似系数(不是不是真实距离度量)通过

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

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

用于位向量x和y.

现在将其与余弦相似度系数

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

分母之间的区别是x.y项.如果x.y为零,则Tanimoto和余弦相似系数将相同.

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

在几何上,当且仅当xy垂直时,x.y为零.

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

由于xy是位向量(即每个维度中的值只能为0或1),所以x.y等于零表示

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

如果xi * yi = 1 * 1 = 1,则总和为正.为了使总和为零,没有项 xi * yi可以等于1.它们都必须等于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:

所以

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

换句话说,如果xi为1,则yi必须为0,反之亦然.

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

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

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)

例如.

这篇关于谷本系数距离测度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 14:02