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ᵢ)²),衡量向量在空間中的絕對距離。