Description Usage Arguments Value Examples
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.
1 | sim.pearscale(dat, K = 20, alpha = 0.5)
|
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. |
symmetric matrix of size ncol(dat) (number of patients) containing pairwise patient similarities
1 2 | data(xpr)
sim <- sim.pearscale(xpr)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.