select_landmarks {lmds}R Documentation

Select landmarks from dataset

Description

In addition, the distances between the landmarks and all samples are calculated.

Usage

select_landmarks(x, distance_method = c("euclidean", "pearson",
  "spearman", "cosine", "manhattan"), landmark_method = c("sample"),
  num_landmarks = 500)

Arguments

x

A matrix, optionally sparse.

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 distance matrix between the landmarks and all samples. In addition, an attribute "landmark_ix" denotes the indices of landmarks that were sampled.

Examples

library(Matrix)
x <- Matrix::rsparsematrix(1000, 1000, .01)
select_landmarks(x)

[Package lmds version 0.1.0 Index]