改进余弦相似度,用方差协方差调整后更准确
Variance-Adjusted Cosine Distance as Similarity Metric
- 用数据的方差协方差对余弦距离进行修正
- 在乳腺癌数据集上测试准确率达100%
- 适合处理有相关性和波动的数据场景
余弦相似度是内积空间中衡量向量相似性的常用方法,广泛应用于K近邻、聚类等算法。本文指出传统余弦相似度仅在欧氏空间有效,而原始数据存在于随机变量空间中,当数据存在方差与相关性时,该度量不完全准确。尽管已有新度量被提出作为替代,但均未对余弦距离本身进行改进。为此,本文提出一种修正版余弦相似度,通过引入数据的方差-协方差矩阵对余弦距离进行调整。在威斯康星乳腺癌数据集上,使用传统与修正后的余弦相似度分别进行KNN建模对比,结果显示修正公式在测试集上达到100%准确率。
原文摘要 · Abstract (English)
Cosine similarity is a popular distance measure that measures the similarity between two vectors in the inner product space. It is widely used in many data classification algorithms like K-Nearest Neighbors, Clustering etc. This study demonstrates limitations of application of cosine similarity. Particularly, this study demonstrates that traditional cosine similarity metric is valid only in the Euclidean space, whereas the original data resides in a random variable space. When there is variance and correlation in the data, then cosine distance is not a completely accurate measure of similarity. While new similarity and distance metrics have been developed to make up for the limitations of cosine similarity, these metrics are used as substitutes to cosine distance, and do not make modifications to cosine distance to overcome its limitations. Subsequently, we propose a modified cosine similarity metric, where cosine distance is adjusted by variance-covariance of the data. Application of variance-adjusted cosine distance gives better similarity performance compared to traditional cosine distance. KNN modelling on the Wisconsin Breast Cancer Dataset is performed using both traditional and modified cosine similarity measures and compared. The modified formula shows 100% test accuracy on the data.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。