Learn R Programming

lmds (version 0.1.0)

lmds: 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.

A fast dimensionality reduction method scaleable to large numbers of samples. Landmark Multi-Dimensional Scaling (LMDS) is an extension of classical Torgerson MDS<U+00B4>, 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", "manhattan"), 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

Run this code
# NOT RUN {
library(Matrix)
x <- Matrix::rsparsematrix(1000, 1000, .01)
lmds(x, ndim = 3)
# }

Run the code above in your browser using DataLab