Description Usage Arguments Value Examples
View source: R/basic_functions.R
This is an altered cosine distance: it first reduced the dimension of the two input vectors to only those coordinates where both have non-zero entries. The cosine similarity is then computed on these reduced vectors, i.e. on a sub-vector space.
1 | cosineMatchDist(a, b)
|
a, b |
Numerical vectors of same length |
The scalar product of the reduced input vectors divided by the product of the norms of the two reduced input vectors
1 2 3 4 | ## 1. Orthogonal vectors:
cosineMatchDist(c(1,0),c(0,1))
## 2. Non-orthogonal vectors:
cosineMatchDist(c(1,0),c(1,1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.