COSINE DISTANCE MEASURE
Originally written by P. Cejchan, 1999/08/13. Algorithm taken from:
Carbonell, J.G.& al. 1997 "Translingual Information Retrieval: A comparative
evaluation. IJCAI'97". See also Salton, G. 1989 "Automatic text processing:
The transformation, Analysis, and retrieval of information by computer".
Addison-Wesley, Reading, Pennsylvania. (Jongman, et. al., 1995, page
178)--"More emphasis is given to qualitative aspects by not considering a
site as point but as a vector. Understandably, the direction of this vector
tells us something about the relative abundances of species. The similarity
of two sites can be expressed as some function of the angle between the
vector of these sites. Quite common is the use of the cosine (or Ochiai
coefficient):
cos=OS=sigma(k)Y(ki)Y(kj)/sqrt{[sigma(k)(Y(ki)^2)][sigma(k)(Y(kj))^2)]}"
<-- this is obviously for distance between columns, not rows (P.C).