Skip to contents

Similarity Network Fusion (SNF) integrates multiple views (similarity matrices) to construct an overall status matrix. This function is adopted from the SNFtool (https://github.com/maxconway/SNFtool/) and has been enhanced for unsupervised analysis of spatial ecosystem. The new function supports sparse matrix and missing data in the input matrices.

Usage

SNF2(Wall, K = 50, t = 5, minibatch = 5000, ncores = 1, verbose = FALSE)

Arguments

Wall

List of similarity matrices. Each element of the list is a square, symmetric matrix that shows affinities of the data points from a certain view.

K

Number of neighbors in K-nearest neighbors part of the algorithm.

t

Number of iterations for the diffusion process.

minibatch

Integer specifying the number of columns to process in each minibatch. Default is 5000. This option splits the matrix into smaller chunks (minibatch), thus reducing memory usage.

ncores

Integer specifying the number of CPU cores to use for parallel processing.

verbose

Boolean specifying whether to show the progress messages.

Value

A fused matrix.