SimilarityM: Compute the similarity matrix

View source: R/SimilarityM.R

SimilarityMR Documentation

Compute the similarity matrix

Description

Computes low dim embedding, constructs KNN graph on the embedding -> unweighted adjacency Calls manifold learning algorithm which uses the normalized sample vectors and the unweighted adjacency matrix to compute a low rank approximation of the data.

Usage

SimilarityM(
  lambda = 0.5,
  data,
  comps_knn = NULL,
  use_umap_indices = FALSE,
  pre_embed_method = "umap",
  ...
)

Arguments

lambda

the balance term between the rank of Z and the error, default is 0.5

data

the expression data, where each column is treated as a normalized vector

comps_knn

number of components to use for knn, overrides eigengap-based inference

use_umap_indices

use the knn indices computed during umap embedding to impose sparsity on L2R2, instead of recomputing based on the layout.

pre_embed_method

how the initial non-linear embedding is performed, default is 'umap'

...

extra arguments passed to umap or Rtsne

Value

a list containing

W

the similarity matrix

E

the error of the ADMM step

nl_embedding

the KNN sparsity constraint is based on this embedding


mkarikom/RSoptSC documentation built on May 10, 2023, 1:10 a.m.