相似度矩阵->特征向量算法?

发布于 2024-12-09 09:27:07 字数 393 浏览 0 评论 0 原文

如果我们有一组 M 个单词,并且提前知道每对单词含义的相似度(有一个 M x M 相似度矩阵),我们可以使用哪种算法为每个单词生成一个 k 维位向量,这样每对单词就可以通过比较它们的向量来比较(例如获得向量的绝对差)?

我不知道这个特殊问题如何称呼。如果我知道的话,在一堆具有相似描述、做其他事情的算法中找到它就会容易得多。


附加观察:

我认为该算法必须会产生一种副作用,在这种情况下是需要的。如果从矩阵来看,单词 A 与单词 B 相似,B 与 C 相似,但检测到的 [A,C] 相似度较低,则计算出的结果向量差值也应产生较高的 [A,C] 相似度。因此,我们将填补矩阵中先前的空白 - 以某种方式平滑该算法的相似性。但除了这种平滑之外,目标是使结果尽可能接近矩阵中的原始数字。

If we have a set of M words, and know the similarity of the meaning of each pair of words in advance (have a M x M matrix of similarities), which algorithm can we use to make one k-dimensional bit vector for each word, so that each pair of words can be compared just by comparing their vectors (e.g. getting the absolute difference of vectors)?

I don't know how this particular problem is called. If I knew, it would be much easier to find among a bunch of algorithms with similar descriptions, which do something else.


Additional observation:

I think this algorithm would have to produce one, in this case wanted, side effect. If, from the matrix, word A is similar to word B and B is similar to C, but there is low [A, C] similarity detected, the calculated result vectors difference should produce high [A, C] similarity as well. So, we would fill in the previous gaps in the matrix - smoothen the similarities with this algorithm somehow. But besides this smoothing, the goal is to have results as close as possible to the original numbers that we had in a matrix.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

流年已逝 2024-12-16 09:27:07

您可以进行截断奇异值分解 (SVD) 来找到最佳 k 秩近似矩阵。这个想法是将矩阵分解为三个矩阵:U、sigma 和 V,其中 U 和 V 是正交矩阵,sigma 是对角矩阵。

通过截断不重要的奇异值,您可以获得 O(k*m) 存储空间。

You could do a truncated singular value decomposition (SVD) to find the best k-rank approximation to the matrix. The idea is the decompose the matrix into three matrices: U, sigma, and V such that U and V are orthonormal and sigma is diagonal.

By truncating off unimportant singular values, you can achieve O(k*m) storage space.

仅冇旳回忆 2024-12-16 09:27:07

如果您只对第一个特征向量 + 特征值感兴趣,则幂迭代可能会很有用。我曾经用它从文本文档中提取关键字。 (基于句子内的词间距离,但相似性也可能有效)

If you are only interested in the first eigenvector + eigenvalue, the power-iteration will probably be useful. I once used it to extract keywords from text documents. (based on inter-word distance within the sentences, but similarity will probably work, too)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文