Open seb951 opened 5 years ago
Hi,
it seems like the function distanceMatrix() calculates a distance that is equal to 1-cossim(). This is counter intuitive given that the distanceMatrix() documentations states distFun = "cossim", not distFun = "1 - cossim".
distanceMatrix()
1-cossim()
distFun = "cossim"
distFun = "1 - cossim"
See this example:
load(file = system.file("extdata","annotatedSpeclist.RData",package = "CluMSIDdata")) distmat = distanceMatrix(annotatedSpeclist[1:20]) distmat[1,2] == cossim(annotatedSpeclist[[1]],annotatedSpeclist[[2]]) [1] FALSE distmat[1,2] == 1-cossim(annotatedSpeclist[[1]],annotatedSpeclist[[2]]) [1] TRUE]
Hi,
it seems like the function
distanceMatrix()
calculates a distance that is equal to1-cossim()
. This is counter intuitive given that thedistanceMatrix()
documentations statesdistFun = "cossim"
, notdistFun = "1 - cossim"
.See this example: