CosineDistance

CosineDistance[u,v]

gives the angular cosine distance between vectors u and v.

Details

Examples

open allclose all

Basic Examples  (2)

Cosine distance between two vectors:

Cosine distance between numeric vectors:

Scope  (2)

Compute distance between any vectors of equal length:

Compute distance between vectors of any precision:

Applications  (1)

Cluster data using cosine distance:

Properties & Relations  (3)

Cosine distance includes a dot product scaled by norms:

Cosine distance includes a dot product scaled by Euclidean distances from the origin:

CosineDistance of vectors shifted by their means is equivalent to CorrelationDistance:

Wolfram Research (2007), CosineDistance, Wolfram Language function, https://reference.wolfram.com/language/ref/CosineDistance.html.

Text

Wolfram Research (2007), CosineDistance, Wolfram Language function, https://reference.wolfram.com/language/ref/CosineDistance.html.

CMS

Wolfram Language. 2007. "CosineDistance." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CosineDistance.html.

APA

Wolfram Language. (2007). CosineDistance. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CosineDistance.html

BibTeX

@misc{reference.wolfram_2024_cosinedistance, author="Wolfram Research", title="{CosineDistance}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/CosineDistance.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_cosinedistance, organization={Wolfram Research}, title={CosineDistance}, year={2007}, url={https://reference.wolfram.com/language/ref/CosineDistance.html}, note=[Accessed: 21-November-2024 ]}