Hello Amir,
 
You can use e.g. validity measures from the cluster.stats() function from Christian Hennig.
It *depends on your data*, which and if a validity criteria of cluster.stats can be used to give an answer to the question, which number of cluster is the right choice.
In case of the xclara data, you can use any of these validity criteria and any validity criteria of cluster.stats give you the right answer to select 3 clusters...
 
library(fpc)
data(xclara)
a3 <- clara(xclara, 3)
a4 <- clara(xclara, 4)
d <- dist(xclara)
val1 <- cluster.stats(d, a3$clust)
val2 <- cluster.stats(d, a4$clust)
barplot(c(val1$avg, val2$avg))
 
# --> 3 cluster are better than 4!
 
I´m very interested to learn more about evaluation of clusters and I´m courious about opiniuns and results of yours and other people...

 Best,

Matthias

 

	-----Ursprüngliche Nachricht-----
	Von: Amir Safari [mailto:amsa36060@yahoo.com] 
	Gesendet: Dienstag, 31. Mai 2005 11:20
	An: R-help@stat.math.ethz.ch
	Cc: TEMPL Matthias
	Betreff: [R] How to access to sum of dissimilarities in CLARA
	
	
	 
	 
	Dear Matthias,
	So many thanks for your answer. Let me please to say I mean the SUM of dissimilarities. For example I want to compare the result of a clustering with k=4 with another clustering with k=5 . How is it possible to compare these two results ? What give us p$diss? ( a lot of dissimilarities).  We need only a single measure( sum of dissimilarities.apart of silhouette measure).
	Thanks again.
	Amir
	 


	TEMPL Matthias <Matthias.Templ@statistik.gv.at> wrote:

		Hello,
		
		#Example:
		
		data(xclara)
		p <- clara(xclara,3)
		names(p)
		p$diss
		
		Best,
		Matthias
		
		> Dear All ,
		> Since dissimilarity is one of quality measures in clustering 
		> , I'm trying to access to the sum of dissimilarity as a whole 
		> measure. But after running my data using CLARA I obtain : 
		> 1128 dissimilarities, summarized :
		> Min. 1st Qu. Median Mean 3rd Qu. Max. 
		> 0.033155 0.934630 2.257000 2.941600 4.876600 8.943700 
		> But I can not find the sum of dissimilarity.How can i access to it?
		> 
		> Thanks a lot
		> Safari
		> 
		> __________________________________________________
		> 
		> 
		> 
		> [[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
		> 
		

	
________________________________

	Do You Yahoo!?
	Yahoo! Small Business - Try our new Resources site! <http://us.rd.yahoo.com/evt=31637/*http://smallbusiness.yahoo.com/resources/> 

	[[alternative HTML version deleted]]


