[R] How a clustering algorithm in R can end up with negative silhouette values?

David L Carlson dcarlson at tamu.edu
Sun Feb 21 17:37:45 CET 2016

Each observation is assigned to the closest medoid, a single observation. An observation that is between two medoids will be assigned to the closer one even if its distances to members of the other cluster are closer on average (but the medoid of that cluster is slightly farther away). If the clusters are not well separated, this can happen easily. 

You could always change the cluster assignment vector to see what happens to the silhouette plot. That will affect more than just the single observation since silhouette values of all of the points in those two clusters will change slightly (very slightly if there are lots of observations in those two clusters).

David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352

-----Original Message-----
From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of ABABAEI, Behnam
Sent: Friday, February 19, 2016 1:55 PM
To: sarah.goslee at gmail.com
Cc: r-help at r-project.org
Subject: Re: [R] How a clustering algorithm in R can end up with negative silhouette values?

Hi Sarah,

Thank you for the response. But it is said in its description that after each run (sample), each observation in the whole dataset is assigned to the closest cluster. So how is it possible for one observation to be wrongly allocated, even with clara?



On Fri, Feb 19, 2016 at 11:48 AM -0800, "Sarah Goslee" <sarah.goslee at gmail.com<mailto:sarah.goslee at gmail.com>> wrote:

That means that points have been assigned to the wrong groups. This
may readily happen with a clustering method like cluster::clara() that
uses a subset of the data to cluster a dataset too large to analyze as
a unit. Negative silhouette numbers strongly suggest that your
clustering parameters should be changed.


On Fri, Feb 19, 2016 at 6:33 AM, ABABAEI, Behnam
<Behnam.ABABAEI at limagrain.com> wrote:
> Hi,
> We know that clustering methods in R assign observations to the closest medoids. Hence, it is supposed to be the closest cluster each observation can have. So, I wonder how it is possible to have negative values of silhouette , while we are supposedly assign each observation to the closest cluster and the formula in silhouette method cannot get negative?
> Behnam.

	[[alternative HTML version deleted]]

R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list