dist_cross {orthoDr} | R Documentation |
Cross distance matrix
Description
Calculate the Gaussian kernel distance between rows of X1 and rows of X2.
As a result, this is an extension to the stats::dist()
function.
Usage
dist_cross(x1, x2)
Arguments
x1 |
First data matrix |
x2 |
Second data matrix |
Value
A distance matrix with its (i, j)th element being the Gaussian kernel
distance between ith row of X1
jth row of X2
.
Examples
# two matrices
set.seed(1)
x1 <- matrix(rnorm(10), 5, 2)
x2 <- matrix(rnorm(6), 3, 2)
dist_cross(x1, x2)
[Package orthoDr version 0.6.8 Index]