[Rd] Canberra distance

2010-02-06 Thread Christophe Genolini
Hi the list, According to what I know, the Canberra distance between X et Y is : sum[ (|x_i - y_i|) / (|x_i|+|y_i|) ] (with | | denoting the function 'absolute value') In the source code of the canberra distance in the file distance.c, we find : sum = fabs(x[i1] + x[i2]); diff = fabs(x

Re: [Rd] Canberra distance

2010-02-06 Thread Duncan Murdoch
On 06/02/2010 10:39 AM, Christophe Genolini wrote: Hi the list, According to what I know, the Canberra distance between X et Y is : sum[ (|x_i - y_i|) / (|x_i|+|y_i|) ] (with | | denoting the function 'absolute value') In the source code of the canberra distance in the file distance.c, we fin

Re: [Rd] Canberra distance

2010-02-06 Thread Christophe Genolini
The definition I use is the on find in the book "Cluster analysis" by Brian Everitt, Sabine Landau and Morven Leese. They cite, as definition paper for Canberra distance, an article of Lance and Williams "Computer programs for hierarchical polythetic classification" Computer Journal 1966. I do n

Re: [Rd] Canberra distance and binary distance

2010-02-06 Thread Christophe Genolini
I guess there is also a problem in the binary distance since x <- y <- rep(0,10) dist(rbind(x,y),method="binary") gives 0 whereas it suppose to be undefine. (the aka asymmetric binary is not suppose to take in account the (off,off) couples in its calculation) Christophe The definition I use

Re: [Rd] Canberra distance

2010-02-06 Thread Duncan Murdoch
On 06/02/2010 11:31 AM, Christophe Genolini wrote: The definition I use is the on find in the book "Cluster analysis" by Brian Everitt, Sabine Landau and Morven Leese. They cite, as definition paper for Canberra distance, an article of Lance and Williams "Computer programs for hierarchical polyt

[Rd] win-builder offline

2010-02-06 Thread Uwe Ligges
Dear package developers, the win-builder service provided at http://win-builder.r-project.org/ will be offline from roughly 7pm (CET) today until 5pm (CET) tomorrow. Best wishes, Uwe Ligges __ R-devel@r-project.org mailing list https://stat.ethz.ch/

Re: [Rd] Canberra distance

2010-02-06 Thread Jari Oksanen
On 06/02/2010 18:10, "Duncan Murdoch" wrote: > On 06/02/2010 10:39 AM, Christophe Genolini wrote: >> Hi the list, >> >> According to what I know, the Canberra distance between X et Y is : sum[ >> (|x_i - y_i|) / (|x_i|+|y_i|) ] (with | | denoting the function >> 'absolute value') >> In the so

Re: [Rd] Canberra distance

2010-02-06 Thread Bill.Venables
That is interesting. The first of these, namely sum(|x_i - y_i|) / sum(x_i + y_i) is now better known in ecology as the Bray-Curtis distance. Even more interesting is the typo in Henry & Stevens "A Primer of Ecology in R" where the Bray Curtis distance formula is actually the Canberra distanc

Re: [Rd] Canberra distance

2010-02-06 Thread Prof Brian Ripley
This is cetainly ancient R history. The essence of the formula was last changed - dist += fabs(x[i1] - x[i2])/(x[i1] + x[i2]); + dist += fabs(x[i1] - x[i2])/fabs(x[i1] + x[i2]); in October 1998. The help page description came later. The dist += fabs(x[i1] - x[i2