powered by
In addition, the distances between the landmarks and all samples are calculated.
select_landmarks(x, distance_method = c("euclidean", "pearson", "spearman", "cosine", "manhattan"), landmark_method = c("sample"), num_landmarks = 500)
A matrix, optionally sparse.
The distance metric to use. Options are "euclidean" (default), "pearson", "spearman", "cosine", "manhattan".
The landmark selection method to use. Options are "sample" (default).
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.
"landmark_ix"
# NOT RUN { library(Matrix) x <- Matrix::rsparsematrix(1000, 1000, .01) select_landmarks(x) # }
Run the code above in your browser using DataLab