【发布时间】:2012-01-27 02:53:05
【问题描述】:
我必须找到参考文档和存储库中的文档集之间的相似性。
Method :
1. I find the term document matrix for all the documents including the reference document
2. The svd is calculated for this matrix
3. I take the v array(The third result)
4. I transpose this matrix so that the each row represents a document .
5. The first row represents the reference document .
6. I find the cosine similarity beween this row and the rest of the rows
我的疑惑:
由于我的 db 中有大约 7 个文档,因此我只得到 8*8 varray(document matrix) 。那么,如果我仅找到这 8 个值的余弦相似度,我会得到正确的结果吗?
这种方法普遍采用吗?
我使用 java 来编写代码。我使用 jama 包来查找 svd 。
【问题讨论】:
-
8 个文档是一个非常小的数据集
-
好的.. 但是为了找到余弦相似度,我必须在 svd (usv) 矩阵结果中使用 u 矩阵还是 v 矩阵?
标签: text similarity text-mining lsa