[R] PAM clustering (using triangular matrix)

Jose Quesada quesadaj at psych.colorado.edu
Tue Jan 9 23:53:36 CET 2001


Hi,

I'm trying to use a similarity matrix (triangular) as input for pam() or

fanny() clustering algorithms.
The problem is that this algorithms can only accept a dissimilarity
matrix, normally generated by daisy().

However, daisy only accept 'data matrix or dataframe. Dissimilarities
will be computed between the rows of x'.
Is there any way to say to that your data are already a similarity
matrix (triangular)?
In Kaufman and Rousseeuw's FORTRAN implementation (1990), they showed an

option like this one:

"Maybe you already have correlations coefficients between variables.
Your input data constist on a lower triangular matrix of pairwise
correlations. You wish to calculate dissimilarities between the
variables."

But I couldn't find this alternative in the R implementation.

I can not use foo <- as.dist(foo), neither daisy(foo...) because
"Dissimilarities will be computed between the rows of x", and this is
not
what I mean.

You can easily transform your similarities into dissimilarities like
this (also recommended in Kaufman and Rousseeuw ,1990):

foo <- (1 - abs(foo)) # where foo are similarities

But then pam() will complain like this:

" x is not of class dissimilarity and can not be converted to this
class."

Can anyone help me? I also appreciate any advice about other clustering
algorithms that can accept this type of input.

Thanks a lot in advance,

Jose Quesada

Dept. of Experimental Psychology,
University of Granada, Spain.

Visitor researcher at the
institute of cognitive science
University of Colorado, Boulder, Us.





  visitor researcher
  Institute of Cognitive Science
  University of Colorado (Boulder)
                                         <quesadaj at psych.colorado.edu>
  Muenzinger psychology building Campus Box 344
  Univeristy of colorado at Boulder Boulder, CO
  80309-0344 http://geneura.ugr.es/~jose
  http://lsa.colorado.edu/~quesadaj
                                         Home: 303 545 2082
                                         Work: 303 492 4574













-------------- next part --------------
A non-text attachment was scrubbed...
Name: quesadaj.vcf
Type: text/x-vcard
Size: 501 bytes
Desc: Card for Jose Quesada
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20010109/987feb25/quesadaj.vcf


More information about the R-help mailing list