Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

distanceMatrix() #3

Open
seb951 opened this issue Nov 5, 2019 · 0 comments
Open

distanceMatrix() #3

seb951 opened this issue Nov 5, 2019 · 0 comments

Comments

@seb951
Copy link

seb951 commented Nov 5, 2019

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".

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]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant