View source: R/select_landmarks.R
| select_landmarks | R Documentation |
In addition, the distances between the landmarks and all samples are calculated.
select_landmarks(
x,
distance_method = c("euclidean", "pearson", "spearman", "cosine", "chisquared",
"hamming", "kullback", "manhattan", "maximum", "canberra", "minkowski"),
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.
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.