ApiaryActiveLive
Try: pause · settings · learn · wipe
← Community / Reading Room
AC
applied-measurement · 28 min read

A Cluster Score Depends on the Nearest Alternative Group

Four polished stones lie on a straight rail. Two are close together at one end; two more are close together farther along. If we already know which pair each…

Four polished stones lie on a straight rail. Two are close together at one end; two more are close together farther along. If we already know which pair each stone belongs to, we can ask a useful question about that assignment: how does a stone's distance to its own companions compare with its distance to the most competitive other group? This is the intuition behind the silhouette coefficient. It asks about the geometry of a supplied partition, not whether the world really contains the categories suggested by its labels. That difference is especially important when an analysis will be used to name groups or make decisions about the people, objects, or measurements inside them.

Four polished stones in two small groups along an unmarked wooden rail. (generated editorial illustration; not documentary evidence)
Four polished stones in two small groups along an unmarked wooden rail. (generated editorial illustration; not documentary evidence)

The question looks simple until there are several alternative groups. Imagine a stone positioned a short step from a member of another group, but the rest of that group lies much farther away. Somewhere else there is a more compact group whose nearest member is not the closest individual outside the stone's own cluster. Which group is the more plausible geometric alternative? The silhouette rule takes the mean distance from the chosen stone to each candidate group and then takes the smallest of those means. The closest outsider, the closest center, and the closest average member distance are three different measurements. Only the last defines this coefficient.

That definition gives the score a property worth knowing before choosing a clustering. The silhouette of one point can change when the members of an alternative cluster are regrouped, even if the point and every distance from it stay fixed. It can change when the labels elsewhere in the dataset change, not just when its own label changes. This is not a flaw or a trick. It is a consequence of asking about the nearest other group in a partition, rather than asking about an isolated row or an immutable neighborhood. If a measurement is relational, the report should preserve what it is related to.

Start with the point rather than the cluster center

The scikit-learn documentation for individual silhouettes defines the coefficient using two mean distances. For a chosen observation, call the mean distance to the other members of its assigned cluster a. Do not include the observation itself in that mean. For each other cluster, calculate the mean distance from the chosen observation to all its members. Of those candidate means, call the smallest b. For an observation with both means defined and a positive denominator, subtract a from b, then divide by the larger of a and b. The numerator gives the direction of the contrast; the denominator puts the contrast on a common scale.

The calculation visits distances that start at the chosen observation. It does not first calculate a global average of all the pairs inside the observation's own cluster. Imagine a long queue of people distributed along a platform. A person at the midpoint has a different view of the group than a person standing at one end, even though the platform is the same length for both. The silhouette has a distinct within-group mean at those two positions. This is one reason sorting scores by observation can expose geometry that a single group-wide scatter statistic would hide.

For the alternative side, first calculate a separate mean for each candidate cluster. Do not pool every point outside the assigned cluster into one average. A remote group with many members can exert an enormous pull on a pooled average. Under the silhouette definition it contributes one candidate mean, which has no further effect if another cluster is closer. The smallest candidate mean might come from a very small group or from a large one; that choice is determined by the mean distance, not by a vote among outside observations.

Dividing by the larger mean is different from dividing by the sum or by a fixed reference distance. When the alternative is farther away on average, b is the denominator, and the score is one minus a divided by b. When the own group is farther away on average, a is the denominator, and the score is b divided by a minus one. This piecewise view can make the normalized contrast easier to interpret. It also shows why a score is not itself a distance. Doubling both means does not change the ratio. A result table that only gives silhouettes cannot tell readers whether the original separations were a fraction of an inch, dozens of meters, or units manufactured by a feature transformation.

Mean distances for one toy clustered point

Illustrative only. The numbers below are fictional Euclidean distances, not source observations or official targets. In one dimension, the two observations in cluster A are at positions zero and two; the two observations in B are at eight and ten. The bar chart and its companion table apply only to the observation at position two.

Comparisondistance units
Own cluster2
Nearest other cluster7

The own-cluster mean is two because the only eligible neighbor in A is at zero. The other cluster contains two points, six and eight units away. Their mean is seven. As B is the only other group, it is the nearest other group under the stated rule. The silhouette is five sevenths, which is about 0.714. Using the closest outside point instead would substitute six for seven and give two thirds. That is a different statistic despite using the same positions and assignments. Including the point's own zero distance would change the within mean to one and inflate the coefficient. These two calculation errors pull in opposite directions here, so a result that merely looks plausible is not a reliable check.

The observation at position zero shares the same within mean of two, but its two distances to B are eight and ten. Its alternative mean is nine, and its silhouette is seven ninths. The positions at eight and ten mirror the corresponding inner and outer positions in A. Thus the complete toy partition has two scores of five sevenths and two of seven ninths, and its observation-weighted mean is forty-seven sixty-thirds, about 0.746. The bar chart is not an image of that average. It shows the two distance means used by one of the four observations.

Notice what the outer points demonstrate. They get larger silhouettes even though they do not have smaller own-cluster distances. Their geometric margin comes from being farther from the neighboring alternative. If a dashboard says observations with larger silhouettes sit closer to their group center, the toy case already disproves the explanation. The score combines two measurements, and either of them can drive a difference.

Test the meaning of nearest with three groups

Keep the point at two and its companion at zero, but replace the other half of the first example with two candidate groups. Put cluster B at three and fifteen. Put cluster C at seven and eight. The point at three is now the closest outsider: it lies just one unit away. Nevertheless, the mean distance to B is seven, since the distant member sits thirteen units away. The mean distance to C is five and a half. Therefore C supplies b. The pointwise silhouette becomes seven elevenths. If an explanation identifies the competitor by picking the nearest dot in a scatter plot, it will name the wrong group in this case.

One can also change the rival without moving any dot. In that three-group example, exchange the memberships of the points at eight and fifteen. B then has the positions three and eight; C has the positions seven and fifteen. Now B has the smaller mean, three and a half. The point at two still has the same own group and all the same raw distances. Its new score is three sevenths. It is the outside partition that changed. This distinction matters when an analyst compares two clustering runs and sees that scores change for lots of observations whose own cohort still looks familiar. Each candidate competitor was reevaluated under the newer partition.

A related phenomenon is that splitting a remote group need not affect a point at all. If all the resulting subgroups remain farther away on average than the existing competitor, b is unchanged. But if a formerly broad rival is split and its near section becomes a separate group, the minimum may drop abruptly. There is no general rule that adding a cluster always improves the silhouette or always hurts it. Within means and nearest alternative means can change in different directions for different points. The question is where those changes fall and which cluster an improved overall value no longer represents well.

Comparing means also exposes the limits of using a centroid as shorthand. Put another observation at the origin and a candidate group in one dimension at positions negative six and positive six. Its center is at zero, exactly at the origin, but both member distances are six. Put a different group at positions two and three, whose center is two and a half units away. The second group has the smaller mean distance to members even though its center is farther away. Codes that reuse centers from a fitted model might be efficient, but they do not thereby implement the silhouette's exact mean-distance comparison.

An analyst who wants to report the best competitor needs to retain those separate means or faithfully recompute them. The individual-score interface returns the silhouette values; a value alone does not uniquely identify which group supplied b. Equal values can arise with different alternatives, and several alternatives can tie on a given point. If tie identity is relevant, document whether ties are reported jointly or broken by a stated ordering rule. The silhouette number itself does not need a tie-breaker because all tied means give the same b. A table of alternative assignments is a supplemental diagnostic, not an automatic part of the returned coefficient.

Reading positive, near-zero, and negative values

A positive coefficient says that the defined within mean is smaller than the best outside mean. A negative coefficient says the reverse. Neither statement requires a universal division into broad bands of excellence and failure. In the two-point own cluster of the first example, the within mean is the distance to one companion. A positive number there has the same arithmetic meaning as in a large cluster, but does not reflect the same breadth of comparisons. It is useful to show the cluster size beside the coefficient instead of expecting the number to communicate both facts.

A score near zero means the two means are close relative to their scale. In a plot it may align with an intuitive border, yet there need not be a visible boundary in the original spatial sense. Suppose the observation sits on an island of points, is assigned to a heterogeneous nonlocal group, and has two comparably broad alternatives. The averages can be nearly equal even if there is a visible gap to every small local patch. The coefficient diagnoses a margin under a specific partition and representation; it is not a topographic detector that describes the full shape of the point cloud.

When the number is negative, inspect the alternative before relabeling the point. The fact that another cluster has a lower mean distance may indicate a boundary case, an odd feature value, a stretched own group, a class that overlaps another, or a label that reflects a policy or temporal distinction not captured by the chosen distance. If the partition is being inspected simply as geometry, negative values appropriately call attention to these cases. If the partition is meant to recover outside categories, a separate source of evidence is needed to call a given label wrong.

It is also unsafe to update labels one at a time and assume every change suggested by a negative score is guaranteed to improve the final average. Moving an observation changes the membership of both groups, so scores of other observations may change. The new cluster neighbor for the moved observation can change as well, because the old group has become a candidate and the new group has become the within set. The silhouette evaluates the resulting partition, not a set of independent row predictions made against fixed clusters. A diagnostic can suggest a partition to examine without turning into a proof of improvement.

The endpoints also deserve care. The upper bound follows from subtracting a nonnegative a and dividing by b when b is larger. It is reached, under the simple nondegenerate formula, when a is zero and b is positive. Distinct rows at the same location in the feature space can make a zero if the entire own group coincides. That does not mean that the evidence is strong in a broader sense. Copies, categorical encodings, rounding, and data collection granularity can all cause observations to coincide. The geometry depends on how rows were represented before the calculation.

What happens at the edges of the formula

If there is only one label in the dataset, there is no competing group. If every observation is its own cluster, there is no eligible companion for any within-group mean. The documented domain for both scikit-learn interfaces requires at least two distinct labels and no more distinct labels than the number of observations minus one. It is possible to have one or more singleton groups within an otherwise valid partition. That narrower case should not be confused with a partition that violates the documented domain for the whole calculation.

For a singleton, the empty within mean is not a measured distance of zero to another member. There is no other member. The scikit-learn implementation uses zero for the silhouette in the singleton case. Consider the contrast: if someone substitutes a within mean of zero and then applies ordinary arithmetic with a positive b, they get one. That would give an observation the strongest possible value precisely when it has no companion to support that part of the contrast. The implementation convention avoids that exaggeration, but its zero is still not the same evidence as two well-defined equal positive means.

Both means can also be zero if separate labels contain observations at exactly the same represented location. That is not a neutral distance contrast measured on a meaningful positive scale; it is a zero-denominator case. If analysis contains many zero scores, first check how many come from defined equal or nearly equal means, singleton conventions, or coincident values. An eye-catching spike in a histogram can have several origins. An accompanying count puts more of the evidence on the page without changing the metric.

An empty group is different again. If an upstream algorithm offers ten possible categories but the labels for the evaluated rows use only eight, the silhouette has eight observed labels to compare. An unoccupied group cannot supply a mean distance to members. This can surprise users comparing random subsets or time periods: even if group names remain fixed in a configuration file, the realized set can change in the evaluation sample. Report the number and sizes of groups in the actual evaluated object.

Feature units change the story before clustering begins

A uniform scale change multiplies every pairwise distance by the same positive factor. For example, if one-dimensional positions are converted from meters to centimeters, with everything else held fixed, both means scale together, the nearest other group remains the same, and the coefficient is unchanged. The unnormalized bar chart would need a new axis, even though the silhouette would not move. This invariance holds for the positive scaling of the distances themselves. It should not be confused with immunity to all changes of units when multiple features are involved.

Consider a toy record with length measured in meters and mass measured in kilograms. If only the first feature is converted to millimeters and the calculation uses raw Euclidean distance across the two numeric columns, that column now has a different relative influence. Which groups appear tight and which alternative is nearest can change. Nothing about the underlying objects changed. A familiar rate of change in one field became numerically larger relative to the other. If the report does not say how features were scaled, the result cannot be reliably reconstructed.

Standardizing each feature to put its variation on a more comparable numerical scale may be reasonable. It is not a universal solution, because the question may assign very different substantive importance to different features. Likewise, giving two strongly redundant columns equal individual representation can effectively give a shared underlying dimension extra influence. An analyst should explain which distances are meaningful for the use case and why. It is possible to choose a distance recipe with excellent internal geometry and poor usefulness for the eventual task.

Transformations also give different views of difference. Imagine clustering intervals of waiting time. On the raw scale, changing from one minute to ten minutes has less absolute magnitude than changing from one hundred to one hundred and twenty minutes. On a logarithmic scale for positive values, those relative changes are ordered differently. There is no contradiction if the nearest alternative clusters differ under the two representations. The two analyses use different operational definitions of closeness. A strong comparison presents the separate questions rather than suggesting that one output found the objectively right neighbors.

Distance selection matters even when variables are already dimensionless. Imagine someone compares two shape outlines encoded as a series of equally spaced boundary measurements. If translation has not been removed, shifting a shape can look like changing the shape. If the features instead intentionally represent absolute positions, removal of that same shift may discard information the user wants to keep. The proper representation depends on the distinction an eventual reader or user needs the clusters to make. Sensitivity to these choices is evidence about how the result was built, not an inconvenience to suppress.

A reproducible report therefore describes both the representation used to create the labels and the representation used to evaluate them. They need not always match, but the choice should be explicit. One might ask whether a partition constructed from a broad set of variables remains separated on a narrower set with a substantive interpretation. That is a legitimate diagnostic provided the result is called separation in the narrower representation. It is not a verification that the clustering algorithm optimized that second geometry. The ability to supply a different distance function should make the question more precise, not allow undocumented switches until a pleasing value appears.

A distance matrix is not a similarity table

The documented precomputed option accepts pairwise distances rather than raw feature vectors. The diagonal should be zero. Beyond satisfying the shape and diagonal requirements, there is the analytical obligation to keep row identities and label identities aligned. A square matrix can have the correct dimensions while using a different observation order from the label vector. If so, the calculation can produce a seemingly credible number for the wrong partition. Keep a stable observation identifier in the material used to assemble and verify both objects.

Check how the matrix defines a pair. A score of human-rated likeness where larger values mean closer does not meet the direction assumed by a distance calculation. It is not enough to call the table distances in a filename. If conversion is appropriate, explain the mapping and what it does to the meaning of zero, spread, and averages. Do not assume there is an application-independent way to transform every similarity. The silhouette calculation can only evaluate the pairwise measure it receives; it cannot reconstruct the intended semantics from the row labels.

For precomputed comparisons, distinguish a zero dissimilarity from a missing pair. An observation can be identical to another in the supplied representation; that does not make the absence of a computed comparison equivalent to identity. Filling missing edges with zero can make a group look implausibly tight or create false near alternatives. A matrix of distances along the edges of a network is not, without further definition, a complete matrix of distances between every pair of nodes. Decide what reachable, unreachable, and missing mean before reporting a silhouette for such data.

There is also a subtle trap in applying a monotone change to the distances after the fact. A strictly increasing transformation preserves which individual outsider is closest, but it need not preserve the order of group means. For example, consider candidate distances one and seven for group B and four and five for group C. On the raw scale, B has the smaller mean, four compared with four and a half. Squaring the distances before averaging gives B a mean of twenty-five and C a mean of twenty and a half. The winning group reverses. This is neither a rounding failure nor a new assignment; nonlinear transformation changes what a mean distance emphasizes.

From local margins to one reported score

The scikit-learn score documentation defines the whole-data score as the mean of the individual coefficients. Consequently, groups with more observations have more weight in the summary. For a hypothetical partition containing a large cluster of ninety points averaging 0.8 and a small cluster of ten points averaging negative 0.2, the overall mean is 0.70. That number does not characterize either group well by itself. The smaller cluster remains an issue even though it contributes little to the grand average.

Changing just the presentation can make the tradeoff much more visible. Show both cluster sizes and their individual score distributions. Include how many members have negative silhouettes, but do not present that as the number of confirmed label errors. Show a representative example along with a boundary case and a case with a change of nearest alternative under a second plausible representation. Such diagnostics explain how a respectable mean can coexist with a structurally weak cluster. They also give readers a reason to care about small groups instead of relegating them to a footnote.

An equal-weight mean of the cluster means would answer a different question. For the two-group example above, it yields 0.30, the average of 0.8 and negative 0.2. This alternative lets each labeled group affect the summary equally, but in doing so gives every observation in the smaller group substantially more influence than an observation in the larger one. Neither aggregate should be mistaken for the other, and a bespoke cluster-balanced metric should be labeled separately. Which perspective is useful depends on whether the analytical priority is the typical observation, the typical group, or a particular class of borderline cases.

A display with group sizes can reveal changes in what the mean represents even when two means are numerically close. Take two partitions of the same records. The first has two groups of similar size, each with modest but consistent margins. The second separates a large compact core and leaves a small mixed remainder. The means might be nearly the same, but the designs support different uses. The first might be preferable if every labeled group is advertised as coherent. The second could be useful if the main goal is to isolate a reliable core and openly leave the remainder ambiguous. A metric helps discriminate candidates only after the analysis has a criterion for which failures matter.

Two averages that do not commute

Averaging a and b across all observations and then computing one normalized contrast is not how the standard score is constructed. The nonlinearity is useful to see with a tiny example. Suppose two imaginary point summaries have a and b equal to one and two, then ten and twenty. Both observations have score one half. Now compare a third point with a and b equal to twenty and ten; its score is negative one half. The average of the three scores is one sixth. If you average the distances first, the own and alternative means are thirty-one thirds and thirty-two thirds; the normalized contrast is one thirty-second. These rows illustrate arithmetic only, not a jointly realized cluster geometry.

The distinction becomes even larger when the nearest group differs from point to point. There is generally no single rival whose distance gives a cluster's b values. Taking a mean across observations and finding a single closest competing cluster instead calculates a different object. Such a cluster-to-cluster comparison may be appropriate for a report about possible mergers. It should not replace local nearest alternatives in an explanation of individual silhouettes. The order of operations is a part of the method, not an implementation detail.

Subsampling changes the reference set

Subsampling deserves naming because it can change both the observations averaged and the member sets available for the distance averages. The documented scikit-learn score has a sample-size option and a random-state option for reproducibility. In the implementation, the selected subset is what goes into the sample-silhouette computation. This is not the same design as computing a full-data silhouette for each point and then taking the mean of a random subset of those already computed values. In the former, an observation's comparison groups come from the subset itself.

The difference can be substantial for a small cluster. If it disappears from the subset, it cannot be either an own group or a rival there. If it survives only as a singleton, the treatment of its own score changes. In a small or strongly imbalanced evaluation, a proposed subsample can even fail the documented distinct-label condition. Repeating a sample with a fixed seed improves reproducibility of that exact calculation. It does not establish that it accurately represents the full set of within and between group distances.

A fair comparison between candidate labelings generally benefits from using the same observation set, feature preprocessing and distance rule unless the comparison explicitly asks about changing one of those elements. If random subsets are necessary for computational reasons, keeping observations aligned across the compared runs prevents the apparent effect of a cleaner partition from being confused with a different draw of rows. Repeating the comparison across several subsets gives some indication of sensitivity, but those repeated runs do not provide a substitute for checking small or rare groups directly. A reproducible sample can still omit the most consequential cases.

There is a practical distinction between storing distances and calculating them. A dense square matrix holds an entry for every ordered pair; the number of entries grows quadratically with the number of observations. Chunking can reduce the amount stored at one time without reducing the number of pairs considered for an exact full-data calculation. Approximation or sampling can reduce the work but changes the computed object unless the procedure is designed and validated to preserve it. Record the main tradeoff in the report if it changes who or what supplied the comparison distances. A line saying the software evaluated the clustering is insufficient.

Different shapes can tell different stories

Consider a dataset with two bending ribbons, each densely sampled along its path. Neighboring points on the same ribbon are close, with a visible gap between the two ribbons. A point at one end of a ribbon might nonetheless be quite far on average from other points along it, especially when the ribbon spans a broad area. Some points on the other ribbon could be closer, on average, than the ends of the assigned ribbon. A partition that preserves continuous shapes may receive a modest or poor Euclidean silhouette. That score describes average pairwise geometry; it does not refute a structural argument based on connectivity.

Now consider a large diffuse group enclosing a tight separate pocket. If membership in the pocket is meaningful, keeping it separate might make the average score of the whole partition depart from what one would expect from such a visibly concentrated subgroup. Points scattered around the pocket face a strong competitor even when their own group makes sense as a broader category. The size and shape of the group are not defects in the mathematics. They are conditions to which the mean-distance view is sensitive.

This is why comparing different algorithms exclusively by their silhouettes can privilege certain geometries. A method intended to identify contiguous structures by local relationships and a method intended to discover compact groups may produce partitions with different behavior under the same global distance averages. If compact pairwise separation is the real goal, the score can be directly relevant. If organization along a path or complex shape matters, the score should accompany evidence suited to that purpose. Let the question choose the diagnostic rather than letting the most convenient global metric choose the question.

Boundary structure can also matter under nearly identical average scores. A method that groups elongated structures correctly might misplace several transition cases. A method with lower within means might cut each elongated structure into short segments that are easy to describe geometrically but hard to justify for the application. The meaningful difference may lie in the costs of those two compromises. Showing examples of boundaries and investigating the attributes that distinguish competitors is more informative than reporting the mean alone.

There is no hidden answer key in an internal metric

A silhouette needs distances and candidate labels. It does not take a second set of independently adjudicated labels and compare the assignments to it. That distinction survives even if the calculation is run on labels drawn from a trusted source. In that case the score describes their compactness and separation within the representation, not their truth. The true labels can be entirely appropriate and still overlap in a representation that omits the defining variables.

A hypothetical museum provides a concrete example. Imagine grouping ceramics by place of manufacture. If physical dimensions happen to separate the displayed pieces well, that separation may help interpretation. If designs traveled across regions, however, different origins could have similar dimensions. A silhouette calculated from height and width cannot tell whether the curators' records of origin are wrong. It tells us how well those labels align with those dimensions. Conversely, a clustering with a beautiful visual gap in the same height-width plane might distinguish display proportions rather than production origins.

There are several legitimate names for what follows from this diagnosis. A separation analysis asks about geometry under defined features. An agreement analysis asks how candidate labels align with a reference. A usefulness analysis asks how underlying decisions or outcomes change when the partition is used. The studies can inform one another, but one cannot be substituted for another. An organization that only measures geometry cannot report independent agreement. The right phrase may be simply that the partition offers a compact descriptive summary.

Do not call a coefficient a label confidence unless it has separately been shown to quantify uncertainty in the way the intended use requires. A silhouette of 0.8 is not an eighty percent probability that the label is correct. A negative score is not proof that a person should be sent to another segment. The interval from negative one to positive one is a normalized geometric contrast, not a probability scale. Reports become particularly misleading when a dashboard turns the score into percentages and use of the percentage suggests validation that was never conducted.

Choosing among cluster counts without pretending there is one true answer

Using silhouettes to compare several choices of cluster count is reasonable when the analyst cares about the specific kind of separation they measure. The candidate with the largest observed score is the best by that criterion among the tested candidates. This is a narrower claim than saying the data naturally contain that number of groups. The sizes and features supplied, distance metric, candidate algorithms, and any randomness in fitting are part of the comparison. A record of the candidate settings makes the result comprehensible and potentially reproducible.

Suppose counts of three and four give scores that differ only slightly. The additional cluster may make a real difference in how observations are interpreted, or it may split a familiar group in a way that is not stable. Compare the assignments, check the group distributions, and ask about the costs of choosing a finer partition. The larger score does not tell you whether the extra complexity will help someone navigate the groups or whether the same division survives plausible changes in the inputs. That calls for supplementary analysis, not more decimal places on the score.

A useful stability check distinguishes two sources of variation. Some methods change results when initialized differently on the same observations. Independently, changing observations or features can reveal whether the apparent structure depends on a few points or on a particular preprocessing decision. Experiments on both sources can explain why a single high value is not necessarily a robust choice. Do not describe the spread across such deliberately altered analyses as a general confidence interval unless the design supports that interpretation.

If fitting a grouping procedure will eventually be followed by a predictive assignment rule, document the distinction between descriptive performance and generalization. A silhouette on the known data assesses the evaluated labels in the existing geometry. It does not promise that additional observations will join the same way or that an independent population will have similar groups. Even evaluating on a separate dataset requires defining how its labels and comparison groups are established. A resemblance to classification evaluation does not make the silhouette a supervised loss.

A readable report from raw distances to a decision

Start the report by stating the aim. Is the partition meant to support exploration, data cleaning, work allocation, explanation, or a scientific category claim? Next, identify the observations, features, preprocessing, distance and source of labels. If the analysis changed the usual reporting universe by excluding some labels or using subsampling, say so and give the effective cluster sizes. These details allow the next person to understand why the distances mean what they mean rather than memorizing the decimal displayed in a dashboard.

When showing a pointwise example, echo the structure of the calculation. Show the point's own-cluster mean and its best other-cluster mean; identify the other cluster if the calculation retained it. If the case teaches the difference between a close neighbor and a close group, give the competing means or keep the distances visible. Make sure the figure's title says distance when the axis displays a and b, then put the dimensionless coefficient in a separate sentence. A reader should not need to guess whether a tall bar is a large raw distance or a favorable score.

If there are multiple clusters, consider a view sorted within each one, with the width or height of each segment corresponding to how many observations it represents. A single line marking the overall score provides context, not a target every observation must cross. Small clusters should remain legible, especially when the purpose is to detect isolated or weak groups. Label zeros that arise from the singleton convention separately rather than making them look indistinguishable from observations near geometric boundaries. Include a text counterpart so key comparisons survive if the graph is unavailable.

A decision note can now say something both clear and limited: under the selected features and distance rule, one tested partition has the higher mean, but this specific cluster remains weak and this competing partition offers a different substantive advantage. That tells the audience what the metric supports and where judgment enters. If later evidence changes the intended distance or group meaning, updating the score does not retroactively change what the earlier score described. The context of the old comparison remains relevant.

A last check with an observation moved to the rival

Return to the beginning. Keep the stones fixed at zero, two, eight and ten, but transfer the stone at two from A to B. Now its own mean is seven because the other two B stones are at eight and ten. Its best outside mean is two because A contains only the stone at zero. Its new silhouette is negative five sevenths. The transferred stone itself is the clearest sign that the new assignment fails a local cohesion test, but it is not the whole story. A's one remaining point now gets the singleton convention, and the within means of the original B members also change. Rechecking all rows is necessary when describing the new partition.

The example leaves a useful discipline. Keep raw distances, group memberships, the best competing average, and the normalized score apart. Keep the pointwise values apart from the mean, and keep geometric evidence apart from an independent account of what the labels mean. The silhouette is valuable in part because its arithmetic can be unpacked. When a result looks unintuitive, ask which alternative group the point is competing with, and why that group rather than the nearest dot became the relevant comparison. That answer often contains the insight the headline score leaves behind.

Primary references

Frequently asked
What is A Cluster Score Depends on the Nearest Alternative Group about?
Four polished stones lie on a straight rail. Two are close together at one end; two more are close together farther along. If we already know which pair each…
What should you know about start with the point rather than the cluster center?
The scikit-learn documentation for individual silhouettes defines the coefficient using two mean distances. For a chosen observation, call the mean distance to the other members of its assigned cluster a. Do not include the observation itself in that mean. For each other cluster, calculate the mean distance from the…
What should you know about mean distances for one toy clustered point?
Illustrative only. The numbers below are fictional Euclidean distances, not source observations or official targets. In one dimension, the two observations in cluster A are at positions zero and two; the two observations in B are at eight and ten. The bar chart and its companion table apply only to the observation at…
What should you know about test the meaning of nearest with three groups?
Keep the point at two and its companion at zero, but replace the other half of the first example with two candidate groups. Put cluster B at three and fifteen. Put cluster C at seven and eight. The point at three is now the closest outsider: it lies just one unit away. Nevertheless, the mean distance to B is seven,…
What should you know about reading positive, near-zero, and negative values?
A positive coefficient says that the defined within mean is smaller than the best outside mean. A negative coefficient says the reverse. Neither statement requires a universal division into broad bands of excellence and failure. In the two-point own cluster of the first example, the within mean is the distance to one…
References & sources
  1. Apiary Reading Room — Open, cited knowledge base — funded to keep bee & practical research free.
From the Apiary Reading Room. Opinion & editorial — not financial advice. We don't overclaim.
More from the Reading Room