Description Usage Arguments Details Examples
View source: R/match_two_sig_sets.R
Find an optimal matching between two sets of signatures subject to a maximum distance
1 2 3 4 5 6 7 | match_two_sig_sets(
x1,
x2,
method = "cosine",
convert.sim.to.dist = function(x) { return(1 - x) },
cutoff = 0.9
)
|
x1 |
A numerical-matrix-like object with columns as signatures. |
x2 |
A numerical-matrix-like object with columns as signatures.
Needs to have the same number of rows as |
method |
A character string that specifies a method for
|
convert.sim.to.dist |
If |
cutoff |
A maximum distance or minimum similarity over which to
pair signatures between |
Match signatures between x1
and x2
using the function
solve_LSAP
, which uses the
"Hungarian" (a.k.a "Kuhn–Munkres") algorithm
https://en.wikipedia.org/wiki/Hungarian_algorithm,
which optimizes the total cost associated with the links
between nodes.
The functions converts similarities to distances,
and generates a distance matrix between the two
sets of signatures.
It sets distances > cutoff
to very large values.
It then applies solve_LSAP
to the resulting
matrix to compute a matching between
x1
and x2
that minimizes the sum of the
distances.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.