余弦相似度测量 [英] Cosine similarity -measurement

查看:110
本文介绍了余弦相似度测量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我有一个关系表.
用户项目
我想使用向量空间计算用户的余弦相似度.
我需要什么才能在两个二维数组中表示表.

看起来像
item1 item2 item3 item4 item n

user1 1 1 0 0
user2 0 0 1 1

所以user1(1 1 0 0)的向量1意味着有它,0其他
谢谢你的时间 .希望我能找到帮助!!

Hi all ,
i have a ralational table .
user-item
i want to compute the coisne similarity of the users using vector space.
what i need how can i reprent the table in two dimenstinal array .

to look like
item1 item2 item3 item4 item n

user1 1 1 0 0
user2 0 0 1 1

so the vector for user1 ( 1 1 0 0) 1 means have it , 0 others
thanks for your time . hope i find a help !!

推荐答案

在此处明确描述: http://en.wikipedia.org/wiki/余弦相似度 [^ ],
http://en.wikipedia.org/wiki/Euclidean_vector#Dot_product [
This is clearly described here: http://en.wikipedia.org/wiki/Cosine_similarity[^],
http://en.wikipedia.org/wiki/Euclidean_vector#Dot_product[^].

—SA


这篇关于余弦相似度测量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆