[R] Specifying medoids in PAM?
Martin Maechler
maechler at stat.math.ethz.ch
Wed Jun 8 18:57:55 CEST 2005
>>>>> "David" == David Finlayson <david.p.finlayson at 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.
the posting guide asks you to provide reproducible examples, in
any case, not just for bug reports ...
{and strictly speaking, you still haven't provided one, since
it's a bit painful to read in your table below -- because of the
extra row names ... but here I'm nit picking a bit }
David> I wanted to see if I was using the command correctly.
Yes, you were.
David> Here is a complete example (the row names have numbers in them):
>> library(cluster)
>> stats.table
David> slope.for slope.ter prof.len break.elv
David> 1 ALLYN W 0.09 0.05 63.3 1.46
David> 2 ARCADIA 0.12 0.09 40.8 0.43
David> 3 BURFOOT 0.12 0.03 58.9 0.78
David> 4 CAMA BE 0.15 0.05 50.4 0.88
David> 5 DASH PO 0.09 0.01 290.5 3.14
David> 6 EAGLE C 0.09 0.01 226.4 1.49
..................
>> 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.
I can confirm to get segmentation faults using this example data
with k=5 , so effectively, it seems you've uncovered a bug in pam().
I will investigate and patch eventually.
Thank you for the report.
Martin Maechler,
ETH Zurich
David> Thanks,
David> David
David> On 6/8/05, Martin Maechler <maechler at stat.math.ethz.ch> wrote:
>> >>>>> "David" == David Finlayson <david.p.finlayson at gmail.com>
>> >>>>> on Tue, 7 Jun 2005 12:11:25 -0700 writes:
>>
David> I am using the PAM algorithm in the CLUSTER library.
David> When I allow PAM to seed the medoids using the default __build__
David> algorithm things work
David> well:
>>
>> >> pam(stats.table, metric="euclidean", stand=TRUE, k=5)
>>
David> But I have some clusters from a Hierarchical analysis that I would
David> like to use as seeds for the PAM algorithm. I can't figure what the
David> mediod argument wants. When I put in the five integer indicies for the
David> observations in stats.table that I would like to use as seeds (the row
David> numbers), I segfault R.
>>
>> >> pam(stats.table, metric="euclidean", stand=TRUE, medoids=c(1,3,20,2,5), k=5)
>>
David> *** R Crashes ***
>>
>> this is not very helpful.
>>
>> Can you please READ the posting guide and then
>> do as the guide says :
>>
>> - post a *reproducible* example
>> - tell more about what happens when "R Crashes"
>>
David> Here is my version info:
>> >> version
David> _
David> platform i386-pc-mingw32
David> arch i386
David> os mingw32
David> system i386, mingw32
David> status
David> major 2
David> minor 0.1
David> year 2004
David> month 11
David> day 15
David> language R
>>
David> Any guidance would be appreciated.
>>
David> David
>>
David> --
David> David Finlayson
David> Marine Geology & Geophysics
David> School of Oceanography
David> Box 357940
David> University of Washington
David> Seattle, WA 98195-7940
David> USA
>>
David> Office: Marine Sciences Building, Room 112
David> Phone: (206) 616-9407
David> Web: http://students.washington.edu/dfinlays
>>
David> ______________________________________________
David> R-help at stat.math.ethz.ch mailing list
David> https://stat.ethz.ch/mailman/listinfo/r-help
David> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>>
David> --
David> David Finlayson
David> Marine Geology & Geophysics
David> School of Oceanography
David> Box 357940
David> University of Washington
David> Seattle, WA 98195-7940
David> USA
David> Office: Marine Sciences Building, Room 112
David> Phone: (206) 616-9407
David> Web: http://students.washington.edu/dfinlays
More information about the R-help
mailing list