Re: [R] partitioning cluster function

2006-04-07 Thread Friedrich . Leisch
 On Wed, 5 Apr 2006 12:58:00 -0700,
 Linda Lei (LL) wrote:

   Hi All,
   For the function bclust(e1071), the argument base.method is
   explained as must be the name of a partitioning cluster function
   returning a list with the same components as the return value of
   'kmeans'.

 

   In my understanding, there are three partitioning cluster functions in
   R, which are clara, pam, fanny. Then I check each of them to see which
   of them can get same components as the return value of kmeans, by
   using the following codes:

 

The functions in the cluster package will not work, because they have
different interface (names of arguments and return values). cclust
from the package of the same name can be used together with kmeans,
but note that that is no longer actively maintained (see my email to
r-help from a few minutes ago).

Best,
Fritz

-- 
---
Prof. Dr. Friedrich Leisch 

Institut für Statistik  Tel: (+49 89) 2180 3165
Ludwig-Maximilians-Universität  Fax: (+49 89) 2180 5308
Ludwigstraße 33
D-80539 München  http://www.ci.tuwien.ac.at/~leisch

__
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


[R] partitioning cluster function

2006-04-05 Thread Linda Lei
Hi All,

 

For the function bclust(e1071), the argument base.method is
explained as must be the name of a partitioning cluster function
returning a list with the same components as the return value of
'kmeans'.

 

In my understanding, there are three partitioning cluster functions in
R, which are clara, pam, fanny. Then I check each of them to see which
of them can get same components as the return value of kmeans, by
using the following codes:

 

x - rbind(matrix(rnorm(100, sd = 0.3), ncol = 2),

matrix(rnorm(100, mean = 1, sd = 0.3), ncol = 2))

 

cl - kmeans(x, 2)

 

cl.clara-clara(x,2)

 

cl.pam-pam(x,2)

 

cl.fanny-fanny(x,2)

 

But it seems like none of them have exactly the same components as
kmeans (Please see P.S.). Could you please help me clearify which
methods included in the argument base.method?  

 

Thank you!

 

P.S.:

 

For example clara:

 

Medoids:

Objective function:  

Clustering vector:   

Cluster sizes:   

Best sample:

Available components:

 [1] sample medoidsi.med  clustering objective
clusinfo   diss  

 [8] call   silinfodata  

 

But kmeans has:

 

K-means clustering with 2 clusters of sizes 50, 50

Cluster means:

Clustering vector:

Within cluster sum of squares by cluster:

Available components:

[1] cluster  centers  withinss size

 

 


[[alternative HTML version deleted]]

__
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