Re: [R] Specifying medoids in PAM?

From: David Finlayson <david.p.finlayson_at_gmail.com>
Date: Fri 10 Jun 2005 - 09:15:56 EST

Thanks for your help, that worked.

David

On 6/8/05, Martin Maechler <maechler@stat.math.ethz.ch> wrote:
> >>>>> "MM" == Martin Maechler <maechler@stat.math.ethz.ch>
> >>>>> on Wed, 8 Jun 2005 18:57:55 +0200 writes:
>
> >>>>> "David" == David Finlayson <david.p.finlayson@gmail.com>
> >>>>> on Wed, 8 Jun 2005 09:24:54 -0700 writes:
>
> David> Sorry, I wasn't trying to submit a bug report just yet.
>
> MM> the posting guide asks you to provide reproducible examples, in
> MM> any case, not just for bug reports ...
> MM> {and strictly speaking, you still haven't provided one, since
> MM> it's a bit painful to read in your table below -- because of the
> MM> extra row names ... but here I'm nit picking a bit }
>
> David> I wanted to see if I was using the command correctly.
>
> MM> Yes, you were.
>
>
> >>> pam(stats.table, metric="euclidean", stand=TRUE, medoids=c(1,3,20,2,5), k=5)
>
> David> This command crashes RGUI.exe and windows sends an error report to
> David> Microsoft. It also crashes if I first subtract the NA rows from
> David> stats.table.
>
> MM> I can confirm to get segmentation faults using this example data
> MM> with k=5 , so effectively, it seems you've uncovered a bug in pam().
> MM> I will investigate and patch eventually.
>
> I found and fixed the bug:
> Some part of the C code was assuming that the indices in
> 'medoids' were sorted (increasingly).
>
> I.e., for the moment you can easily work around the problem by
> using
> pam(stats.table, ...., medoids=c(1,2,3,5,20), k=5)
> instead of
> pam(stats.table, ...., medoids=c(1,3,20,2,5), k=5)
>
>
> The next version of the cluster package which allows to specify
> the "fuzzyness exponent" in fanny() will have this problem
> fixed.
>
> Martin Maechler,
> ETH Zurich
>

-- 
David Finlayson
Marine Geology & Geophysics
School of Oceanography
Box 357940
University of Washington
Seattle, WA  98195-7940
USA

Office: Marine Sciences Building, Room 112
Phone: (206) 616-9407
Web: http://students.washington.edu/dfinlays

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Jun 10 09:21:16 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:28 EST