Hello,
thank you all. I have been able to solve my problem with your help.
The problem I am trying to solve is:
I am working on a clustering method to group a data base. At the moment I am
using the clustering hierarchical method and trying to get to the best K
group value via the silhouette fu
Is this what you want:
> library(cluster)
> d<-hclust(dist(iris[,-5]))
>
> avgs<-sapply(1:20,function(x)
+ summary(silhouette(cutree(d,x),
+
+ dist(iris[,-5]
> # str(avgs)
>
> # print out the average widths
> for (i in 2:length(avgs)){ # ignore first item
+ cat('i=', i, 'average=', avgs[[
On Dec 31, 2010, at 10:34 AM, ADias wrote:
ADias wrote:
Hi,
I am using the code below to get a plot that will show me on the X
axis
the number of clusters and on the Y axis the cluster average widths.
However I am getting this error:
Error in summary(silhouette(cutree(d, x), dist(iris[
ADias wrote:
>
> Hi,
>
> I am using the code below to get a plot that will show me on the X axis
> the number of clusters and on the Y axis the cluster average widths.
> However I am getting this error:
>
> Error in summary(silhouette(cutree(d, x), dist(iris[, -5])))$si.summary :
> $ operat
Hi,
I am using code below to get a plot that will show me on the X axis the
number of clusters and on the Y axis the cluster average widths. However I
am getting this error:
Error in summary(silhouette(cutree(d, x), dist(iris[, -5])))$si.summary :
$ operator is invalid for atomic vectors
the
5 matches
Mail list logo