select_landmarks: Select landmarks from dataset

Description Usage Arguments Value Examples

View source: R/select_landmarks.R

Description

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

Usage

1
2
3
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

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

lmds documentation built on Sept. 27, 2019, 5:03 p.m.