【全英文警告!】如何比较两个向量的相似度

本文介绍了如何衡量两个向量的相似度,主要讨论了Jaccard相似性和余弦相似性。Jaccard相似性通过交集与并集的比例来度量集合的相似度,而余弦相似性则基于内积空间中向量的夹角余弦值。此外,还提到了角度距离和Otsuka-Ochiai系数在向量相似性研究中的应用。
摘要由CSDN通过智能技术生成

Jaccard Similarity

Basic Concept

A statistic used for measuring the simularity and diversity sample sets [ 2 ] ^{[2]} [2]

The Jaccard coefficient measures the similarity of between the finite sample sets, and is defined as the intersection divided by the size of union of the sample sets.

J ( A , B ) = ∣ A ∩ B ∣ ∣ A ∪ B ∣ = ∣ ∣ A ∩ B ∣ ∣ A ∣ + ∣ B ∣ − ∣ A ∩ B ∣ ∣ J(A,B)=\frac{|A\cap B|}{|A\cup B|}=|\frac{|A\cap B|}{|A|+|B|-|A\cap B|}| J(A,B)=ABAB=A+BABAB

tips:

  1. If A and B are both empty, define J ( A , B ) = 1 J(A,B)=1 J(A,B)=1

  2. 0 ≤ J ( A , B ) ≤ 1 0\le J(A,B) \le1 0J(A,B)1

The Jaccard distance
The scale that measure dissimiarity between sample sets, is complementary(互补的) to the Jaccard coefficient

d J ( A , B ) = 1 − J ( A , B ) = ∣ A ∪ B ∣ − ∣ A ∩ B ∣ ∣ A ∪ B ∣ d_{J}(A,B)=1-J(A,B)=\frac{|A\cup B|-|A\cap B|}{|A\cup B|} dJ(A,B)=1J(A,B)=ABABAB

Alternative interpretation of the Jaccard distance is as the ratio of the size of the symmetric difference

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-Xe8LhOhr-1603603260602)(images/symmetric_difference.png)]

A Δ B = ( A ∪ B ) − ( A ∩ B ) A\Delta B=(A\cup B)-(A\cap B) AΔB=(AB)

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值