getSimilarity {netDx} | R Documentation |
Measures of patient similarity
getSimilarity(x, type = "pearson", customFunc, ...)
x |
(matrix) matrix for which pairwise patient similarity is to be computed. Expects one column per patient, and one measurement per row. |
type |
(character) name of similarity measure. Currently supports Pearson correlation ('pearson') or a custom measure ('custom') |
customFunc |
(function) custom similarity function. Only used when
|
... |
parameter for customFunc |
symmetric matrix of size N, where N is number of samples
data(xpr) x <- getSimilarity(xpr) # similarity by Pearson corr mySim <- function(x) cor(x,method='kendall') x <- getSimilarity(xpr,customFunc=mySim) # custom similarity