[R] Error in the function "dissimilarity"

domerg caroline.domerg at cirad.fr
Tue Nov 21 08:47:34 CET 2006


Hi,

In the function "dissimilarity" from the library "arules", we noticed a 
mistake about the computation of the Dice Similarity Index.

In theory, it returns the value  2 * a / (2*a + b + c) , but its value 
in the source file is the following :

(2 * a / (2*a_b_c))  with a_b_c = a+b+c

Therefore, it equals here to the Jaccard one which is a / (a + b + c)  
whereas it must be similar to Jaccard but giving double
the weight to agreeing items (a).

We verified on simple examples and compared results with other functions 
like dist.binary from ade4.

Are we right ? And so how to modify the function to use it ?

sincerely yours,

Caroline Domerg and Frédéric Chiroleu
UMR 53 PVBMT (Peuplements Végétaux et Bio-agresseurs en Milieu Tropical)
CIRAD
Pôle de Protection des Plantes (3P) - Saint-Pierre
Île de la Réunion



More information about the R-help mailing list