tdepke / CluMSID

Clustering of MS² Spectra for Metabolite Identification
MIT License
10 stars 3 forks source link

cossim() function different from typical cosine score formula #4

Open peterdaniel666 opened 3 years ago

peterdaniel666 commented 3 years ago

Hi,

cossim() function calculates cosine score using "sum(sqrt(mm[, 2]) sqrt(mm[, 3])) / (sqrt(sum(mm[, 2])) sqrt(sum(mm[, 3])))", which is different from the typical formula "x y / ||x|| ||y||". I was wondering why is that?