sim.pearscale: various similarity functions Similarity function: Pearson...

Description Usage Arguments Value Examples

View source: R/similarities.R

Description

Computes Pearson correlation between patients. A scaled exponential similarity kernel is used to determine edge weight. The exponential scaling considers the K nearest neighbours, so that similarities between non-neighbours is set to zero. Alpha is a hyperparameter that determines decay rate of the exponential. For details see Wang et al. (2014). Nature Methods 11:333.

Usage

1
sim.pearscale(dat, K = 20, alpha = 0.5)

Arguments

dat

(data.frame) Patient data; rows are measures, columns are patients.

K

(integer) Number of nearest neighbours to consider (K of KNN)

alpha

(numeric) Scaling factor for exponential similarity kernel. Recommended range between 0.3 and 0.8.

Value

symmetric matrix of size ncol(dat) (number of patients) containing pairwise patient similarities

Examples

1
2

netDx documentation built on Dec. 11, 2020, 2:01 a.m.