| lmds | R Documentation |
A fast dimensionality reduction method scaleable to large numbers of samples. Landmark Multi-Dimensional Scaling (LMDS) is an extension of classical 'Torgerson MDS', but rather than calculating a complete distance matrix between all pairs of samples, only the distances between a set of landmarks and the samples are calculated.
lmds(
x,
ndim = 3,
distance_method = c("euclidean", "pearson", "spearman", "cosine", "chisquared",
"hamming", "kullback", "manhattan", "maximum", "canberra", "minkowski"),
landmark_method = c("sample"),
num_landmarks = 500
)
x |
A matrix, optionally sparse. |
ndim |
The number of dimensions |
distance_method |
The distance metric to use. Options are "euclidean" (default), "pearson", "spearman", "cosine", "manhattan". |
landmark_method |
The landmark selection method to use. Options are "sample" (default). |
num_landmarks |
The number of landmarks to use, |
The dimensionality reduction in the form of a nrow(x) by ndim matrix.
library(Matrix)
x <- Matrix::rsparsematrix(1000, 1000, .01)
lmds(x, ndim = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.