gaussianKernel: Computes gaussian kernel matrix

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Tensorflow implementation of tSNE's gaussian kernel.

Usage

1
2
3
4
5
6
7
8
gaussianKernel(
  data,
  data_shape,
  labels = NULL,
  method = NULL,
  perplexity = 30,
  diag = "zero"
)

Arguments

data

cell x feature data matrix

data_shape

number of features for data

labels

cell x 1 annotation (label) vector

method

Kernel to compute pairwise cell similarity

perplexity

neighborhood parameter for gaussian kernel

diag

indicator for self similarity

Value

Tensorflow op

Examples

1
2
3
4
5
6
## Input data, 100 cells x 10 features
data = matrix(sample.int(1000, 100*10, TRUE), 100, 10)
rownames(data) = paste0("cell", seq_len(100))
colnames(data) = paste0("gene", seq_len(10))

result = gaussianKernel(data, nrow(data))

quon-titative-biology/scAlign documentation built on Nov. 17, 2021, 9:57 a.m.