为什么我的T-SNE图与欧几里得和余弦距离看起来相似

发布于 2025-02-13 06:57:21 字数 582 浏览 0 评论 0原文

我对我制作的两个T-SNE地块有疑问。 我有一组850篇文章,我想检查哪些文章彼此相似。 这是通过首先对文章进行预处理,然后制作整个集合的TF-IDF向量并制作此TF-IDF的T-SNE图来完成的,其中一个具有余弦距离,一个具有欧几里得距离。

但是,它们看起来都非常相似,看起来有点像只有轴是切换的,或者是什么...是否有逻辑上的推理?

颜色是文章从简单的情感分析中获得的标签。

余弦距离上方

欧几里得距离上方

都要提前提供任何帮助!

I have a question about two t-SNE plots I made.
I have a set of 850 articles for which I wanted to check which articles are similar to each other.
This was done by pre-processing the articles first, then making a tf-idf vector of the whole set and making a t-SNE plot of this tf-idf, one with cosine distances and one with euclidean distances.

However, they both look very similar, it looks a bit like that only the axes are switched or something... Is there any logical reasoning for this?

The colors are the labels an article got from a simple sentiment analysis.

This is the Cosine distances

Above the Cosine Distances

This is the Euclidean distances

Above the Euclidean distances

Thanks for any help in advance!

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

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

发布评论

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

评论(1

总攻大人 2025-02-20 06:57:21

测试结果表明,对于特定类型的数据,欧几里得距离和余弦距离可能是相同的距离函数(达到某些缩放系数)。您可以通过两个距离矩阵的热图来验证这一点。

The test result indicates that Euclidean distance and cosine distance are likely the same distance function (up to certain scaling factor) for the specific type of data. You could verify this by heatmaps of the two distance matrixes.

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