| kmatdistmat | R Documentation |
Apply kmatdist to every pair of kanjimat objects to compute
the unbalanced or balanced Wasserstein distance.
kmatdistmat(
klist,
klist2 = NULL,
p = 1,
C = 0.2,
type = c("unbalanced", "balanced")
)
klist |
a list of |
klist2 |
an optional second list of |
p, C, type |
the same as for the function |
A matrix of dimension length(klist) x length(klist2) having
as its (i,j)-th entry the distance between klist[[i]] and
klist2[[j]]. If klist2 is not provided it is assumed to be equal to
klist, but the computation is more efficient as only the upper triangular part
is computed and then symmetrized with diagonal zero.
kmatdist, kanjidistmat
kmatdistmat(fivetrees1)
kmatdistmat(fivetrees1, fivetrees1) # same result but slower
kmatdistmat(fivetrees1, fivetrees2) # note the smaller values on the diagonal
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.