Re: [R] 1-Pearson's R Distance

From: Claudia Beleites <cbeleites_at_units.it>
Date: Thu, 27 Nov 2008 17:00:58 +0100

Hi Rodrigo,

afaik, (1 - r_Pearson)/2 is used rather than 1 - r_Pearson. This gives a distance measure ranging between 0 and 1 rather than 0 and 2. But after all, dies does not change anything substantial. see e.g. Theodoridis & Koutroumbas: Pattern Recognition.

I didn't know of the proxy package, but the calculation it straightforward (though a bit wasteful I suspect: first the whole matrix is produced, and as.dist cuts it down again to a triangular matrix):

as.dist (0.5 - cor (t(x) / 2))

Take care wheter you want to use x or t(x).

HTH Claudia

-- 
Claudia Beleites
Dipartimento dei Materiali e delle Risorse Naturali
Università degli Studi di Trieste
Via Alfonso Valerio 6/a
I-34127 Trieste

phone: +39 (0 40) 5 58-34 47
email: cbeleites_at_units.it

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 27 Nov 2008 - 16:38:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 28 Nov 2008 - 15:30:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive