View source: R/match_signatures_pairwise.R
| match_signatures_pairwise | R Documentation |
match_signatures_pairwise takes two vectors of image signatures and
produces a vector of Hamming distances between the pairwise elements of the
signatures.
match_signatures_pairwise(x, y, distance = ~nearest * bilinear)
x, y |
Vectors of class |
distance |
A one-sided formula (or character string which can be
coerced to a formula) with one or both of the terms |
While match_signatures produces a matrix of Hamming distances
between each of the x elements and each of the y elements, sometimes it
is helpful to simply calculate Hamming distances between pairs of elements
in each vector—e.g. x[i] and y[i], x[j] and y[j], etc.
match_signatures_pairwise calculates these pairwise distances and
returns a numeric vector.
A numeric vector, each element v[i] of which is the Hamming
distance between the x[i] and y[i] signatures. The formula supplied to
the distance argument will be present as an additional attribute to the
return vector, named formula.
## Not run:
# Setup
sigs <- create_signature(example_urls)
# Find pairwise matches between vectors
match_signatures_pairwise(sigs, sigs)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.