Description Usage Arguments Value Examples
View source: R/select_landmarks.R
In addition, the distances between the landmarks and all samples are calculated.
1 2 3 | select_landmarks(x, distance_method = c("euclidean", "pearson",
"spearman", "cosine", "manhattan"), landmark_method = c("sample"),
num_landmarks = 500)
|
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, |
The distance matrix between the landmarks and all samples. In addition, an attribute "landmark_ix"
denotes the indices of landmarks that were sampled.
1 2 3 | library(Matrix)
x <- Matrix::rsparsematrix(1000, 1000, .01)
select_landmarks(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.