ProjectSNN: Calculates shared nearest neighbors between samples (columns)...

Description Usage Arguments Value

View source: R/similarity.R

Description

Calculates shared nearest neighbors between samples (columns) in a test matrix and samples in a training matrix Adapted from Seurat

Usage

1
2
ProjectSNN(test.data, train.data, n.pcs = NULL, features.use = NULL,
  k = 30, k.scale = 10, prune.SNN = 1/15, print.output = T)

Arguments

test.data

Test data

train.data

Training data

features.use

Subset of features to use (default is all features)

k

Number of nearest neighbors

k.scale

k*k.scale is the number of nearest neighbors to calculate shared nearest neighbors for

prune.SNN

Minimum fraction of shared nearest neighbors

print.output

Prints progress bar if true

pcs.use

If not null, run PCA on training data and project test data before computing SNN

Value

A n.test x n.train matrix with the shared nearest neighbors between test and training data


yanwu2014/swne documentation built on Dec. 14, 2018, 3:07 p.m.