Compute the Euclidean distance and cosine similarity between two vectors. Used for feature similarity, nearest-neighbour checks and clustering analysis.
余弦相似度范围为 [−1, 1]。
欧氏距离 d(x,y)=√(Σ(xᵢ−yᵢ)²),衡量向量在空间中的绝对距离。