sparseDistanceMatrixXY: Create sparse distance, covariance or correlation matrix from x, y
Description
Exploit k-nearest neighbor algorithms to estimate a sparse matrix measuring
the distance, correlation or covariance between two matched datasets.
Critical to the validity of this function is the basic mathematical
relationships between euclidean distance and correlation and between
correlation and covariance. For applications of such matrices, one may see
relevant publications by Mauro Maggioni and other authors.
Usage
sparseDistanceMatrixXY(x, y, k = 3, r = Inf, sigma = NA,
kmetric = c("euclidean", "correlation", "covariance", "gaussian"),
eps = 1e-06, ncores = NA)
Arguments
x
input matrix, should be n (samples) by p (measurements)
y
input matrix second view, should be n (samples) by q (measurements)
k
number of neighbors
r
radius of epsilon-ball
sigma
parameter for kernel PCA.
kmetric
similarity or distance metric determining k nearest neighbors
eps
epsilon error for rapid knn
ncores
number of cores to use
Value
matrix sparse p by q matrix is output with p by k nonzero entries