lmds: Landmark MDS

lmdsR Documentation

Landmark MDS

Description

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.

Usage

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
)

Arguments

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,

Value

The dimensionality reduction in the form of a nrow(x) by ndim matrix.

Examples

library(Matrix)
x <- Matrix::rsparsematrix(1000, 1000, .01)
lmds(x, ndim = 3)

dynverse/lmds documentation built on Sept. 25, 2023, 4:39 p.m.