机器学习—学习模型中涉及的相似性度量方法

–最近几天要上国外教授的课,所以主要发文章的时间会在晚上,主要给大家概括性的总结一些东西,大家可以当作提纲参考,如果有学习的过程最好能够有记录和大家一起分享(评论或者写…

–最近几天要上国外教授的课,所以主要发文章的时间会在晚上,主要给大家概括性的总结一些东西,大家可以当作提纲参考,如果有学习的过程最好能够有记录和大家一起分享(评论或者写文章联系我,给大家发)。

机器学习—学习模型中涉及的相似性度量方法

今天晚上给大家总结机器学习里面用到过或者在博客或者论坛见过的向量相似性度量方法。

1.欧氏距离

2.余弦距离 和 修正余弦距离

3.曼哈顿距离

4.切比雪夫距离

5.闵式距离

6.平均距离

7.马氏距离

8.测地距离

9.Mean Character difference

10.Indexing of association

机器学习—学习模型中涉及的相似性度量方法

在这些相似性度量里面,最常用的无疑是欧氏距离和余弦距离,我主要对这两个详细说一说。

1.欧氏距离

欧式距离在二维和三维空间中指的就是两点间的直线距离,对应到N维空间的的计算公式也就很好理解,这里借用百度百科截图。

机器学习—学习模型中涉及的相似性度量方法

可以理解,这就是差向量的长度。在工程中,欧式距离虽然简单但也常用,是最简单明了衡量两个向量差距的相似性度量方式。

2.余弦距离

但是有些时候,我们关注一个向量更关注的往往不是差距,而是趋势。这个时候用向量的角度差距去衡量往往更合理。举个例子:

机器学习—学习模型中涉及的相似性度量方法

如图所示,显然的c向量和b向量在趋势上是更一致的,和a就相差甚远,所以余弦距离衡量相似性也是在一定应用场景下很合理的。

3.修正的余弦距离

有其合理自然大家也会觉得有其不合理,向量长度往往也有其在实际场景下的意义。如下图所示:

机器学习—学习模型中涉及的相似性度量方法

如何确定向量c和向量a、b中哪一个相似度更高呢?这时候就引入了修正余弦距离。

参考曾经某博客看到的文章的例子,没有找到链接所以我自己来讲吧。比如三个向量为a=(1,0)b=(5,5)c=(2,3)

d(a, b) = cos(a-(a+b+c)/3, b-(a+b+c/3))

d(a, c) = cos(a-(a+b+c/3, c-(a+b+c/3))

泛化公式:

机器学习—学习模型中涉及的相似性度量方法

总结起来就是“先平均化,再余弦值”。

调整后的余弦相似性,在做图像推荐的时候效果会较前两种有显著提高,建议大家尝试。

其他的方法就算是给大家启发了,我都没有用过,希望大家学习愉快。

It was a fun ride, it really was. I wholesale nfl jerseys can’t resist cheesecake and tiramisu. So this is the Nokia 2520, it’s a great 10 inch tablet. Some will argue the to be approved acquisition of DirecTV (DTV) will make a difference. Roger Goodell (RG): “The NFL this season will be selling video packages to fantasy football fans, who want to review or watch live digital feeds of the games to track their players. In most football games, the distance of a punt is measured from where the ball is snapped to where it lands, not from where the punter kicks the ball from. The advantage to this defense is the ability to present different appearances to cheap fake oakleys the offense and the variety of blitz packages. The gig brought with it acclaim and travel . But such concerns don’t even matter, really, not anymore. His best wins were against Liston (Twice), Floyd Patterson (Twice), George Chuvalo, George Foreman, Joe Frazier (Twice), and Kenny Norton (Twice). However, in a poor division they have positioned themselves well.. An extended physical therapy and rehabilitation program over a period of months facilitates restoration of ankle function. For, the BCCI IPL is one platform where the Congress and the BJP cohabit, normally with ease. Believe it or not, the rule mandating a year of college helps both the college and pro game. We’re thankful that Bruce Arians is out of the hospital and apparently well enough to coach this week. ET Oct. He made just $35,000 in 2014.. Once you turn on the machine, the steps start moving and you continuously walk in place on them for the duration of your workout. Nike cortez. Strahan’s selection marks the end of a year long search in which Ripa auditioned 59 celebrities Cheap mlb Jerseys to see who would be the best fit since Philbin’s retirement including Neil Patrick Harris, Alec Baldwin, Kim Kardashian and fake ray ban sunglasses Jerry Seinfeld. We maintain our view that there is a place for both streaming and traditional television to co exist cheap oakleys in the foreseeable future and accordingly, we expect this uptrend to continue in the coming years. Ornelas was banned due to incriminating samples collected between December 2009 and November 2010. He simply wanted his son to wait until he got back before giving it to him. Hearing story after story shifted pieces of my heart. The Cowboys pass defense was ranked 21st in the NFL coming into the game and the Eagles never tried to test them deep. ”Of that, about half comes from broadcast fees, which is shared evenly. A flowchart of the molecular profiling methods can be found in Supplementary Figure S1. Curt Schilling needs to be inducted.. All times are ET. He has participated in 100m, 200 m and 400m races.

为您推荐

发表评论

电子邮件地址不会被公开。 必填项已用*标注

返回顶部
本页面加载共:43 次查询 | 用时 0.755 秒 | 消耗 52.93MB 内存