Description Usage Arguments Value Examples
The normalised angle between two vectors, bounded between 0 and 1. A value of 1 indicates the two vectors have a similarity of 0 degrees. While two vectors diametrically opposed have a value of 0.
1 | angular_similarity(a, b)
|
a |
Vector |
b |
Vector |
out Angle similarity, between 0 and 1
1 2 3 4 5 6 7 8 | a <- c(-1, 0)
b <- c(-1, -1)
angular_similarity(a, b)
# Vectors of length > 2
x <- c(1, 4, 2, 2.5)
y <- c(5, 200, 4, -1)
angular_similarity(x, y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.