On this page

Cluster analysis – method notes

The decisions behind the cluster analysis module – which bound, refusal, fallback or package argument stands behind each card, and the numbers that validate them, each computed on the example dataset (cafe.csv) with the data page’s three fixes applied. Sections follow the manual’s.

Requirements

Every k is held below the number of objects, and a Step 2 range’s maximum with it. A k equal to the object count is an all-singleton solution: cluster::silhouette() returns a bare NA there, which takes the whole validity block down with it, and Calinski–Harabasz divides by n − k. So case mode needs k + 1 complete cases and variable mode k + 1 variables – and still two complete cases, since dist() over the transposed matrix needs two rows to see any spread between two variables. The refusal is a toast naming both counts, before anything reaches R.

Validation. On the café’s rating, spend and visits after the change, 192 members are complete, so k = 192 is refused – “Not enough complete cases (192) for 192 clusters” – and k = 191 is the largest the run accepts.

FANNY is held to fewer clusters than half the objects. fanny() stops with an error for any k above ⌊n/2⌋ − 1, its documented range being 1 to n/2 − 1 for n objects, so the module checks the same bound before anything reaches R – Step 3’s k and a Step 2 range’s maximum alike – and refuses the run with a toast naming the bound and the object count, rather than letting the package’s error end it.

Biclustering needs two complete cases, as many as the biclusters asked for, and under FABIA no more biclusters than variables. The auto-k algorithms carry no k to check the row count against, and a one-row matrix reaches R and dies there with a raw package error, so two complete cases is the floor for every algorithm; fabia() hard-errors with “Too many biclusters. Stopped.” once the count passes min(nrow, ncol), and the columns are always the binding side here, so FABIA’s k is capped at the variable count before the run – where Cheng & Church and BiMax simply return fewer biclusters than asked for and need no cap.

Constant variables are dropped before the run, and listed. scale() maps a constant column to NaN, which kmeans() rejects and dist() silently drops, so a variable constant across the complete cases would either abort the run or vanish from it without a trace; the module removes it first, prints it as Excluded (no variance), and refuses the run when fewer than two variables are left.

Number fields are validated where they are typed, never repaired. An empty number input parses to NaN, and every comparison against NaN is false, so an unguarded value slips past every range check and interpolates into the R source as the literal NaN; a value the browser accepted but never enforced reaches R as an out-of-range argument – probs = 1.5, iter.max = 0, p = 0. Clamping such a value into range would run an analysis the user never asked for and print it as theirs, so every field is checked against the min and max its markup declares – a count field for a whole number as well – and an invalid one is flagged beside it and blocks the step that reads it; a field hidden for the chosen algorithm or options is not read, so it blocks nothing. The two bounds of a Step 2 range are each valid alone, so a maximum not above the minimum is refused when the comparison runs, rather than raised to fit.

Step 1: Method & settings

Standardization is locked to per-variable z-scores in variable mode and to none under Gower, and the user’s own choice is kept meanwhile. The squared Euclidean distance between two z-scored columns is 2(n−1)(1−r), so standardizing the columns is exactly what makes a variable-mode distance a correlation – an unstandardized variable-mode run would measure something else under the same label, so the select is locked to per-variable z-scores. Gower divides each numeric variable’s difference by that variable’s own range, and the ratio is unchanged by any linear rescaling of the column, so a prior z-scoring would leave every coefficient as it was while the card reported a standardization that did nothing; the select is locked to none instead. The user’s own answer is remembered while either lock holds and restored when it lifts.

Validation. On the six café items in variable mode, the Ward tree under Euclidean distance and the tree under 1 − r cut at two give the same partition – slow against the other five – and the Euclidean tree’s first merge, taste with fresh at height 13.95, is 2⋅199⋅0.489, the 1 − r tree’s own first height.

Per-case scaling centres each case or divides it by its norm, and is withdrawn wherever it would change nothing. Column standardization treats each variable on its own, so in case mode it can remove neither a case’s level nor its size. Centring each case on its own mean removes the level and keeps the spread. Dividing it by its Euclidean norm is the profile of Pinto da Costa et al. (2021), for when the interest “relies on the relative behaviour of the individual curves rather than on their absolute values” (p. 3); Euclidean distance between two such profiles is 2(1−cos⁡θ), θ the angle between the two cases, the uncentred counterpart of 1 − r. A per-case z-score is left out because a case with the same value on every variable has none, and their other profile, division by the sum, because a sum of zero or of mixed signs leaves nothing to divide by meaningfully; a case whose every value is 0 has no norm either, so a profile run leaves it out and lists it rather than divide by zero. The correlation dissimilarities are invariant to centring and to rescaling a case, so the per-case entries are dropped from the select under them rather than run as a no-op the card would report, and variable mode and biclustering scale columns, so the entries are offered in case mode alone. Column and case scaling are entries of one select and never stack.

The metric select is hidden under k-means in case mode, pinned to Euclidean in variable mode, and lists only the metrics the run can use. k-means minimises squared Euclidean distance – the mean is the point that does – so it cannot honour another metric. In case mode the select is hidden without being reset, so a metric picked for k-medoids or hierarchical survives a detour through k-means, and whatever the hidden select holds, the run resolves Euclidean, so a leftover never grades a solution under a geometry it never optimised. In variable mode the select stays on screen because there the metric is what “similar variables” means, and hiding it would put the two correlation entries out of reach; instead its list drops the entries the run cannot use – every one but Euclidean under k-means, and Gower under the other algorithms, since averaging per-variable scores has no reading once the columns are the objects – and a value the list drops is replaced by Euclidean, so the select never shows a metric the run would override. Pinning loses nothing: on standardized variables Euclidean k-means already reproduces the 1 − r clustering, by the identity above.

Short trajectories are pointed to raw Euclidean distance, and away from 1 − |r|. A few repeated measurements on one scale are the input of KmL, which runs k-means on the raw trajectory vector under Euclidean or Manhattan distance (Genolini and Falissard 2010, p. 319) and leaves the waves unstandardized, since on longitudinal data “all measurements are performed on the same scale” (p. 318); per-variable z-scores would remove the sample’s mean change from wave to wave, so the manual points such data to no standardization. Distance methods on raw scores group by level: they “generally identified clusters with parallel trajectories (e.g. high vs. low)” and miss trajectories that change rapidly (Lu 2024, p. 27), and on four waves Euclidean clustering “mainly separated patients by overall symptom burden (trajectory level), whereas LCMMs more often distinguished groups according to change over time (trajectory slope)” (Julià et al. 2026, p. 12) – slope groups are the ground of latent-class mixed models, which the module does not fit – Time series fits them, as growth mixture models. 1 − r drops level and spread together. 1 − |r| scores r = −1 as a distance of 0, so a rising trajectory and its falling mirror image merge – and mirror-image groups are exactly what Pinto da Costa et al. (2021) simulate in every dataset and find in real data; the metric stays for the reverse-keyed items of variable mode it was offered for, and the manual warns against it for trajectories. A correlation over three or four points says little more than its sign: between two unrelated series r has a density proportional to (1−r2)(n−4)/2, so at n = 3 |r| exceeds 0.9 about 29% of the time and at n = 4 r is uniform on −1 to 1, and a case with the same score at every wave has no r at all. No source sets a minimum number of waves for any of these distances, so the manual states the behaviour and sets none.

Ward’s is flagged on a non-Euclidean metric, and each tree is built on the scale its linkage assumes. Centroid and median linkage are Lance–Williams recurrences over squared Euclidean distances and ward.D2 squares its input internally, while 1 − r and Gower’s 1 − s are already squared distances – both similarities are positive semi-definite, so their complements embed as squared Euclidean ones. Metric and linkage together therefore decide what hclust() is handed: centroid and median on a plain dist() get d² and their heights are square-rooted back, ward.D2 on a correlation or Gower dissimilarity gets √d and its heights are squared back, and every other pairing is passed as it is – so every branch returns heights on the dissimilarity’s own scale, which is what the dendrogram axis and the cophenetic correlation read against. The Ward warning fires only on a non-Euclidean metric, Minkowski at p = 2 counting as Euclidean; the centroid and median warning fires on any metric, since hclust defines both for squared Euclidean distances and produces non-monotone merge heights when fed a plain dist() object. An inversion is a real diagnostic, so the heights are drawn as they are and counted in a note on the plot rather than smoothed away.

Validation. On the café’s three standardized variables, centroid linkage produces 9 inversions among its 191 merges and the note appears; Ward’s last three merges sit at 12.48, 12.77 and 16.21 on the Euclidean scale.

Gower reads each column’s class, and the app produces three of daisy’s six sub-types. daisy() decides how a column is compared from its class: the module hands an ordinal variable over as an ordered factor with its levels sorted numerically – ordered() sorts them as text otherwise, putting 10 before 2 – which is Podani’s rank treatment, a categorical variable as a plain factor, and a numeric column as it is; the sub-type codes are read back from the dissimilarity’s Types attribute and printed as the Gower variable types row, since nothing else on the card shows how a variable was scored. daisy’s asymmetric-binary, symmetric-binary and log-ratio codes need a type = argument the module never passes, so the row can only ever read interval, nominal or ordinal – a two-level categorical variable is nominal and a 0/1 numeric one interval. Podani’s paper is cited only when an ordinal variable was present, since a run carrying none never used his treatment.

Validation. On rating, spend, visits, branch and recommend the row reads interval, interval, interval, nominal, nominal, and the coefficient between the first two members is 0.257 – the mean of 0.111, 0.079, 0.093, 0 and 1.

Under Gower the centroid family is withheld and Davies–Bouldin switches to medoids. The sums of squares, variance explained, Calinski–Harabasz, Hartigan, Hopkins, Duda–Hart, the gap statistic and the elbow plot are centroid quantities over a numeric matrix: a mixed-type frame has no mean to take, no bounding box for Hopkins’ uniform probe, no Je for Duda–Hart, and no principal-component box for the gap’s reference. Reporting them from a Euclidean matrix the run never clustered on would grade the solution under another geometry, so they are left off with a note on the card. Davies–Bouldin is recomputed from cluster medoids on the dissimilarity – the index’s own alternative parameterisation, not a substitute statistic – while silhouette, Dunn, the cophenetic correlation, bootstrap stability and the consensus partition read the dissimilarity directly and are unchanged. The biplot rests on prcomp(), which needs a numeric matrix and one arrow per clustering variable, so it is withheld with a note as well; k-means is withdrawn because it needs centroids; cluster profiles and medoids print a modal level where a mean is undefined, and the variable contribution table’s F and η² compare means, so a categorical variable’s row leaves both empty and a note says so.

K-means non-convergence is R’s own rule: past the limit, or a fault. Every one of kmeans()'s four variants that runs out of passes returns iter = iter.max + 1 with ifault 2, and Hartigan–Wong also reports ifault 4 when its quick-transfer steps overrun; a run that converges on its last allowed pass returns iter = iter.max and no fault. The run is therefore flagged when either fault is set or iter > iter.max – R’s own test – and never at iter ≥ iter.max, which would warn on a run R accepts as converged; the warning names min(iter, iter.max), the limit the run stopped at, rather than R’s one-past count. The random starts run under the reproducibility seed, so the same data and settings pick the same starts and the best of them is the same solution.

Validation. On the café’s three standardized variables, k = 3 converges in 2 iterations from the best of 25 starts and no warning is printed.

The Gaussian mixture is a case-mode method over all fourteen covariance models, and reads no metric. A mixture models how the cases are distributed over the variables: its components are densities in the variables’ space, fitted to the coordinates themselves. In variable mode the variables would become the observations, each a point in as many dimensions as there are cases, where every component’s covariance matrix is singular, so the algorithm list drops it there, as the metric select drops what a run cannot use above, and a mixture already chosen is replaced by k-means. A metric would have nothing to act on, so the select is hidden and the run resolves to Euclidean for everything downstream that reads a dissimilarity – the silhouette, Dunn and Davies–Bouldin, the MDS plot, the bootstrap – which grades the partition in the geometry of the space the mixture was fitted in. Every k is fitted with all fourteen of mclust’s covariance models, the parsimonious family of Banfield and Raftery (1993) and Celeux and Govaert (1995), in which each component’s covariance is decomposed into volume, shape and orientation, each held equal across the components, left to vary or – for the spherical and diagonal models – fixed to the axes: the family, rather than the mixture alone, is what lets the fit describe tilted or unequal clusters where k-means describes round ones. EM starts from mclust’s default, its model-based hierarchical clustering, which on a sample larger than mclust.options("subset") – 2,000 cases – is computed on a random subset, so the fit runs under the reproducibility seed.

Standardizing changes the fit of six of the fourteen covariance models. z-scoring divides each variable by its own standard deviation, an unequal rescaling of the axes, and a model is unaffected only when its constraints survive such a rescaling. A common covariance (EEE), covariances proportional to one another (VEE), unconstrained ones (VVV) and ones constrained in volume alone (EVV) map onto covariances of the same model, and so do the four diagonal models, whose axes are the variables’ own; their log-likelihood shifts by the same constant for every partition, so their fit and their clusters do not change. The two spherical models (EII, VII) and the four that tie shape or orientation across the components while leaving the other free (EVE, VVE, EEV, VEV) do not survive it, since rescaling the axes changes each component’s eigenvalues and eigenvectors differently. Under those six the choice changes the partition itself, so it can change which model BIC prefers; the module therefore leaves the choice to the user, unlocked, with a hint under the select.

On centred cases the eight ellipsoidal covariance models cannot be fitted. Centring each case on its own mean makes its values sum to zero, so every case lies in the subspace orthogonal to the vector of ones, one dimension short of the variables, and a covariance estimated in full is singular there. mclust returns no BIC for the eight models that estimate one (EEE, VEE, EVE, VVE, EEV, VEV, EVV, VVV), while the spherical and diagonal models, whose covariances are diagonal, are still fitted; the model table shows the eight without a BIC, as at any k where a model fails, and BIC chooses among the other six.

FANNY runs on the module’s own dissimilarity. Two fuzzy algorithms were within reach: Bezdek’s fuzzy c-means (e1071::cmeans), which moves centroids and so works in Euclidean or Manhattan distance alone, inheriting every k-means restriction; and Kaufman and Rousseeuw’s (1990, ch. 4) fuzzy analysis, cluster::fanny, which minimises a membership-weighted sum of dissimilarities and so takes the matrix PAM takes – every metric, Gower included, and variable mode. The module calls fanny() with diss = TRUE on the dissimilarity every other consumer of the run reads, so the silhouette, Davies–Bouldin under Gower and the bootstrap grade the partition FANNY was fitted on, and adds no package. The partition is fanny’s own clustering, each object’s largest membership – the hard partition its own silhouette information reads too.

The membership exponent defaults to 2 and is held strictly between 1 and 3. FANNY minimises ∑v(∑i,juivrujvrd(i,j))/(2∑jujvr) over the memberships u, and the exponent r sets how much a spread-out membership costs: fanny() requires r > 1, the fit approaching a hard partition as r falls towards 1, and its default of 2 is the value Kaufman and Rousseeuw’s original program fixed. As r grows the optimum flattens towards every membership at 1/k, a fit with no partition in it (below); the upper bound of 3 is the app’s own, a guard on the field rather than a rule from a source, since every step upwards brings that collapse closer. The field sits in Step 1, beside the other algorithms’ settings, because Step 2’s fits read it as well.

DBSCAN and HDBSCAN run on the module’s own dissimilarity, in case mode alone. dbscan::dbscan() and dbscan::hdbscan() both take a dist, so they are called on the dissimilarity every other consumer of the run reads – any metric, Gower’s included – and the silhouette, Davies–Bouldin and the MDS plot grade the geometry the fit used. Like a mixture they describe how densely the cases lie in the variables’ space; in variable mode the objects would be variables scattered through a space with one dimension per case, so the algorithm list drops both there, as it drops the mixture. DBSCAN keeps borderPoints = TRUE, Ester et al.'s (1996) original rule, under which a case within eps of a core point joins that point’s cluster rather than becoming noise, and its core cases are read back with the package’s own is.corepoint(), so the card’s core, border and noise counts are the fit’s. HDBSCAN (Campello, Moulavi and Sander, 2013) is called with minPts alone: cluster_selection_epsilon, Malzer and Baum’s (2020) HDBSCAN(ε), is not exposed. Neither fit draws a random number, so neither reads a seed.

DBSCAN’s minPts follows twice the number of variables; HDBSCAN’s is a fixed 5. minPts counts the case itself, as dbscan() does. For DBSCAN the default is the heuristic Schubert et al. (2017, p. 19:11) recommend, twice the data’s dimensionality, floored at 4 – the value the rule gives for the two variables a run needs – and it follows the variable count until the user edits it. HDBSCAN does not take the rule over. No HDBSCAN source ties minPts to the dimension or to n – Campello, Moulavi and Sander (2013) ran every experiment at 4 – and under HDBSCAN minPts is also the smallest cluster, the simplification those authors adopt, so twice the variables would forbid any group under 20 cases at 10 variables. 5 is the value of the R package’s examples and the one scikit-learn’s defaults amount to, and the card says that minPts sets the smallest cluster.

The plaid background is a grand mean plus row and column effects, and a layer is kept only when it beats three shuffles. biclust documents BCPlaid’s background = TRUE as a background layer “constant for all rows and columns”, but with background.layer left NA it fits that layer with the layer model itself, y ~ m + a + b, over the whole matrix – 1 + (n − 1) + (p − 1) degrees of freedom – so what is removed before the first bicluster is a grand mean plus one effect per case and one per variable, not a constant; with FALSE no background is fitted and the first layer is searched on the values as they stand. Each candidate layer’s sum of squares is compared with the layers fitted on shuffle = 3 permuted copies of the matrix and kept only when it exceeds all three, which is how the model stops on its own. The release rule keeps a case in a layer only while the layer’s residual mean square for that case is below (1 − release) times its total mean square across the layer’s variables, and the same for a variable across the layer’s cases, so a higher release prunes harder.

Validation. On the six café items Plaid returns no layer, standardized or not: no candidate beats its shuffles, since the items’ structure is two factors touching every member rather than blocks.

BiMax binarizes each column at its own quantile. biclust’s binarize() takes one threshold for the whole matrix, which means something different for every variable whenever the run is not standardized; the run instead cuts each column at the chosen quantile of its own values – above it 1, at or below it 0 – and hands the binary matrix to BCBimax() with the two size minimums.

Validation. On the six café items cut at their medians, k = 3 returns 36 members × {value, friendly}, 11 × {quick, slow} and 36 × {taste, value}.

Cheng & Church’s δ is a fraction of the matrix’s own residue, and found rows are masked, not deleted. biclust takes delta as an absolute mean-squared-residue ceiling, which says nothing without the matrix’s scale, so the user’s value multiplies the whole matrix’s residue. BCCC() drops the rand argument, and biclust defaults it to FALSE – which deletes each found bicluster’s rows from the matrix instead of masking them with random values as Cheng and Church prescribe – so the run calls the package’s internal routine with rand = TRUE. alpha is the multiple-node-deletion factor: rows and columns whose mean residue exceeds α × the block’s are removed together before the one-at-a-time deletion and the node addition run.

Validation. The standardized six-item matrix has a mean squared residue of 0.735, so δ = 0.2 is a ceiling of 0.147; the first bicluster returned is 42 members on the five items other than slow, at 0.141.

FABIA’s membership is decided by the threshold, not the sparseness priors. FABIA’s sparsity is soft – nothing in its loadings or factors is ever exactly zero – so membership comes from extractBic(fit, thresZ)'s thresholded row and column indices, and extractBic derives the loading threshold as √mom / thresZ, which is why raising the threshold admits more cases and fewer variables. A bicluster left with no case or no variable is dropped, which is how a too-low threshold returns nothing at all. spl and spz shape the fit and cyc its iterations; FABIA’s banner and per-cycle messages are muffled so the console shows only what the run itself prints.

Spectral’s counts are bounded by the matrix, and its spread threshold is a fraction of the matrix’s own. BCSpectral() drops n_clusters, and without it biclust runs an auto-search whose window collapses on a narrow matrix and errors with “missing value where TRUE/FALSE needed”, so the run calls the package’s internal routine with the count set. numberOfEigenvalues is clamped to min(nrow, ncol) in R as well as in the panel, since the widget’s maximum is only as fresh as the last selection; the group count is capped in the panel at the smallest of min(nCols, nRows) − 1 – both axes are grouped through Hartigan–Wong, which demands strictly fewer centres than points – nCols − minc and nRows − minr, because g groups leave a widest group of m − g + 1 columns and a bicluster is kept only when it is wider than minc, so every g above m − minc returns nothing however permissive the spread threshold. biclust’s withinVar is a mean row-to-centroid distance on the input scale, not a variance, so the user’s fraction multiplies the whole matrix’s mean row-to-centroid distance; a pairing is kept when it has more rows than minr, more columns than minc and a spread below the threshold. Log normalization shifts the matrix so its minimum is 1 before taking logs and removing the row and column means; IRRC and bistochastization shift it non-negative, and under both the first singular vector carries the background and is dropped, so a request for one singular vector is raised to two with a warning.

Step 2: Determine optimal k

Cluster tendency is tested in case mode on a numeric matrix alone, in Euclidean geometry whatever the metric, and each test is read at its own level. Hopkins probes the bounding box of the objects being clustered and Duda–Hart’s reference distribution is a function of their dimension, so on the transposed variable-mode matrix both would describe the case count rather than the variables; a mixed-type frame has neither a bounding box nor a Je, so under Gower neither runs. Hopkins draws m = ⌊n/10⌋ probes – at least two, at most n − 1 – uniformly over the bounding box of the analysis matrix, and m real objects, under the reproducibility seed, and reports Cross and Jain’s (1982) d-dimensional form, H=∑ud/(∑ud+∑wd) over Euclidean nearest-neighbour distances in d variables – the orientation in which 0.5 is random and 1 clustered. The power is the statistic as defined: Wright (2022) shows that only the powered form follows Beta(m, m) under spatial randomness, with the probes drawn over the sampling window and m small against n, so H is read as a test rather than against fixed 0.25 and 0.75 bands – a one-sided p-value from the Beta tail, at the significance level in Settings – and the p-value is withheld when m exceeds n/10, Wright’s bound for the null – below 20 objects, since m is at least two; the note under the table names the window and m of n, so both conditions can be checked. Duda–Hart splits the data with the selected algorithm at k = 2, takes Je(2)/Je(1) as that split’s Euclidean within-cluster sum of squares over the total, and tests it one-sided against Duda and Hart’s normal approximation – mean 1−2/(πp), variance 2(1−8/(π2p))/(np) for n objects on p variables – at a fixed critical z = 3.20, one-sided α ≈ 0.0007, rather than at the significance level: that is the level at which Milligan and Cooper (1985) found the rule among the best stopping rules in their simulation, an empirical calibration rather than a theoretical α, and read at .05 the test overstates the case for two clusters. The p cell is highlighted at the same level, so the cell and the reading never disagree. A non-rejection on either test – Spatial randomness is not rejected, One cluster is not rejected – is printed uncoloured: it has failed to find structure, not shown the data to be structureless (shared rule), so the earlier red on it read a failure the test never found.

Validation. On the café’s three standardized variables Hopkins is 0.985 from 19 probes against 19 of the 192 members, p < .001 on its Beta(19, 19) null – the same draw gives 0.811 unpowered; the best two-cluster k-means split leaves 410.51 of 573 units of variation – a Duda–Hart ratio of 0.716, p = .078, far short of z = 3.20.

The gap statistic is computed on the run’s own dissimilarity, and k is chosen by Tibshirani, Walther and Hastie’s own rule. cluster::clusGap measures W(k) in Euclidean distance, so the module computes the gap itself: W(k) pools each cluster’s sum of squared within-cluster dissimilarities divided by its size, over whatever dissimilarity the run clusters on, and each of B = 100 reference samples is drawn uniformly over the box of the data’s principal components – the paper’s second reference, which shapes the null to the data’s own spread and orientation – and clustered with the same algorithm, all under the reproducibility seed; the standard error is sd(log⁡Wk∗)1+1/B. k is picked by maxSE(method = "Tibs2001SEmax") – the smallest k with Gap(k) ≥ Gap(k + 1) − s(k + 1), the paper’s rule – rather than cluster’s default firstSEmax, and the rule runs over k = 1 to the range’s maximum whatever its minimum, so it can return 1, or a k below the range; the table’s mark and the plot’s highlight follow the rule, not the column’s maximum. A uniform box is no structureless null for a correlation between profiles, so under 1 − r and 1 − |r| a note says so; under Gower there is no box, and the gap is withheld.

Validation. On the café’s three standardized variables under k-means the gap stays between 0.976 and 1.032 from k = 2 to 10 and the rule returns k = 1, so the card reports that the gap statistic favours no cluster structure while the silhouette suggests 3.

The gap statistic is withdrawn under a Gaussian mixture. Its W(k) is a pooled within-cluster sum of squared dissimilarities – the quantity k-means minimises and a mixture does not – so its rule would grade a mixture by a criterion foreign to the fit; and each of the B = 100 reference samples would be refitted with every covariance model at every k of the range, fourteen times the reference fits of any other algorithm. The box is disabled with a hint rather than hidden, so it keeps its state for the other algorithms.

Under a mixture BIC picks k and the covariance model together, ICL stands beside it, and the indices stay as cross-checks. The number of components and the covariance model are chosen as Fraley and Raftery (2002) and mclust choose them: by BIC (Schwarz, 1978) over every model at every k of the range – mclustBIC over the whole grid – the pair with the largest value, which the Step 3 fit at that k reproduces, since it too keeps the best-BIC model. mclust signs BIC as 2 log L − p log n, larger better, the reverse of the convention the other modules print, so every table and the plot carrying it say so. BIC counts the components of a density, which are not the clusters when a cluster is not normal in shape: it may spend several components on one skewed group. ICL (Biernacki, Celeux and Govaert, 2000), BIC less twice the classification entropy, penalises components that overlap, and is shown beside it as the check against that over-splitting – a second pick, never a replacement. The silhouette suggestion is not given, BIC being the mixture’s own criterion; the silhouette and the other indices are still computed on the most-probable-component partition as cross-checks. Each comparison row holds its best-BIC model, refitted by Mclust from the same grid, and its ICL is the largest over all models at that k, so the two columns may describe different models on one row.

The centroid indices are Euclidean whatever the metric; the separation indices read the run’s own dissimilarity. Within SS, variance explained, Calinski–Harabasz and Hartigan are sums of squares around cluster means, which have no accepted non-Euclidean form, so under another metric they are computed from centroids on the analysis matrix and a note under the table says the table mixes two geometries; under Gower there is no mean to take, and they are left out – Calinski–Harabasz with its checkbox. The silhouette and Dunn read the dissimilarity matrix the run clustered on, and Davies–Bouldin, which Davies and Bouldin parameterise by the distance, measures both its scatters and its centroid separations in that metric – from medoids under Gower.

Within SS and variance explained carry no best mark, and Hartigan’s index is read against 10. Both improve monotonically in k, so a mark on either would point at the largest k tested – the one thing a table for choosing k must not advise. Hartigan’s index is (Wk/Wk+1−1)(n−k−1), and Hartigan’s rule of thumb reads a value above 10 as a reason to add a cluster; it needs the next k, so the range’s last row reads N/A.

Validation. On the café’s variables Hartigan is 50.7 at k = 2 – (410.51 ⁄ 323.67 − 1) × 189 – and stays above 10 through k = 9.

The silhouette suggestion is the plain maximum, and a caveat guards the range. Suggested k (silhouette) is the k with the highest average silhouette among those where it is defined, 2 ≤ k < n, falling back to the range’s minimum when none is; the best of a range says nothing about whether the range holds structure, so when no k exceeds 0.25 – the top of Kaufman and Rousseeuw’s no-substantial-structure band, which their table closes at .25 – a caveat under the suggestions names the best score.

An unconverged k takes no best mark and no suggestion; the gap’s own stopped fits are flagged, not dropped. Each k’s k-means fit in the comparison is tested by the rule above, and a fit that stopped at its limit reports a partition the algorithm never finished, so the per-index best marks and the silhouette suggestion are taken over the converged k alone, the unconverged rows staying on the table, shaded, with their note; with no k converged there are no picks. The gap’s 1-standard-error rule cannot skip a k the same way, since it reads each k against the next: a pick that lands on an unconverged k is withheld rather than moved, because a “next converged k” would compare non-consecutive counts, which the rule does not define. The gap statistic also fits k-means on its own – to the data and to each of the B reference sets – and those fits are tested too; a k whose gap rests on a stopped fit keeps its value and its place in the rule, since Tibshirani, Walther and Hastie define it over consecutive k and dropping one would change which pairs are compared, and the value is flagged with a † and a note naming the k, whether the data’s fit stopped and how many of the B reference sets did.

F(k) and F′(k) are Dunn’s partition coefficient and its normalization, cited to Bezdek and Dunn, and grade fuzziness rather than the partition. F(k)=∑i∑vuiv2/n, the mean squared membership, runs from 1/k, every membership equal, to 1 for a hard partition; F′(k)=(kF(k)−1)/(k−1) rescales it to run from 0 to 1 whatever k, so values at different k compare. fanny() returns both as coeff. Kaufman and Rousseeuw (1990, p. 187) define F(k) as “Dunn’s partition coefficient (1976)”, citing the conference paper printed as Dunn (1977); Dunn there credits the coefficient to Bezdek, whose 1973 paper defines it as a measure of cluster validity – so the run cites Bezdek (1973) for the method and Dunn (1977), the source the coefficient is known by, as background. Kaufman and Rousseeuw give the normalization no source of their own – Roubens (1982) is cited only for its name, the non-fuzziness index – so F′(k) adds no citation. A crisper fit is not a better partition, so neither column takes a best mark or feeds a suggestion.

A collapsed or unconverged FANNY fit takes no mark and no suggestion, and a collapsed Step 3 fit reports nothing. As k or the exponent grows, FANNY’s optimum can flatten every membership to 1/k; fanny() then warns rather than errors, and its clustering – the largest of k equal memberships – is an arbitrary tie-break printed as a partition. The run applies the test behind that warning, |F′(k)| < 10⁻⁷, and treats such a k as having found nothing: in Step 2 its row is shaded and takes no best mark and no suggestion, with a note naming the exponent; in Step 3 the card stops at a warning naming both remedies, a lower exponent or a lower k, and prints no partition, index or plot, since a tie-break’s silhouette or profile would describe nothing in the data. A fit that stops at fanny’s iteration limit (maxit = 500) without converging is shaded and unpicked in Step 2 as an unconverged k-means fit is, and in Step 3 flagged and kept, its memberships those it stopped at.

Eps has no default, and the k-distance plot’s knee is offered, not applied. Eps is a distance on the dissimilarity’s own scale – standardized or not, Euclidean or Gower – so no value is right for every run, and the field starts empty. The plot is Ester et al.'s (1996) sorted k-distance graph on the run’s dissimilarity, dbscan::kNNdist() at k = minPts − 1, since dbscan() counts the case itself among its minPts: a case is core at exactly the eps its distance reaches. The knee is the chord rule the elbow plot uses – the point furthest from the line joining the first and last points, both axes rescaled to [0, 1] as in Satopää et al.'s (2011) Kneedle – and a curve whose furthest point lies within 0.05 of the chord has none; it is rounded to three significant figures, since the data’s scale fixes no decimal precision. A knee is a pick the run does not act on until the user takes it, so it is drawn, offered and cited only while interpretation is on. Since the count can hang on eps, the card refits DBSCAN at 0.75, 1 and 1.25 times the eps it ran, minPts held, so a solution that exists only at one radius shows as such.

HDBSCAN has no Step 2. It builds the clusters at every density level and selects the most stable ones, so there is no radius to read off a plot and no count to compare – the condensed tree, an option of Step 3, is its view of the levels. Its one parameter, minPts, is checked instead by refitting at ½, 1 and 2 times the value the run used, rounded, at least 2, a repeated value dropped.

The suggested bicluster count is the most stable k, else the variance-explained elbow, and a flat sweep has none. With stability measured, the suggestion is the k with the highest mean bootstrap Jaccard. Otherwise it is the last k before the gain in variance explained falls below half the gain before it – but a ratio alone fires on noise: BiMax on the hatch fixture gains 0.45 percentage points across k = 2–8 and its first sign flip reads as an elbow, where Cheng & Church over the same range gains 37. So the rule applies only once the curve has risen at least 5 points above its first value, the smallest k tested is suggested otherwise, and the card names the rule it used; when stability was asked for and scored no k, a warning names the fallback.

Validation. BiMax on the six café items over k = 2–6 gains 6.28, 4.72 and 0.93 points, so the gain collapses after k = 4 and 4 is suggested.

Bicluster stability resamples the cases and holds the variables fixed. Each k’s fit – the one the table shows – is scored by Hennig’s (2007) cluster-wise bootstrap Jaccard: rows are drawn with replacement, the algorithm is refitted on the resample, each original bicluster, restricted to the rows the resample contains, is matched to its best counterpart by cell-set Jaccard, and the matches are averaged over the biclusters and the replicates. The variables are the user’s own choice, so they are never resampled. The resampling follows the bootstrap seed in Settings, unseeded by default. Step 3’s per-bicluster Stability column is the same computation on the one fit, a replicate whose refit fails scoring 0.

The F-statistic diagnostics are descriptive only. They come from biclust’s diagnoseColRow, whose null draws cells independently from the whole matrix and so destroys every row and column structure rather than holding the block fixed: any real difference between variables is significant under it, and the biclusters were selected to maximise exactly those effects. The row and column F values are averaged over the biclusters of at least two rows and two columns, the proportions count p-values at or below the significance level in Settings, taken from the per-bicluster p-values when the card renders, and a note on the table and the plot says both are inflated by construction. The shares print plain: an 80% mark and target line once stood on them, a cut no source sets and one the table’s own note undercut (no band without a source). computeObservedFstat’s parametric p-values test the selected block against itself and are ≈ 0 for the same reason, so only the observed F values are read.

Consensus scoring compares repeated runs in both directions, and only a stochastic algorithm is offered it. At every k the algorithm is refitted as many times as the replications field says, each run under its own seed derived from the bootstrap seed – entropy-seeded when that is unset – and every pair of runs is scored by best-match cell Jaccard in both directions and the two averaged, so a run that found two biclusters cannot score high against one that found ten, and a failed run counts as a zero-scoring pair rather than dropping out. At the default 100 runs that is 4,950 pairs per k. BiMax consumes no random numbers, so its runs are identical and the option is hidden under it – keeping its tick, which the run reads as off while it is hidden.

Bicluster overlap and coverage print without a mark. The comparison table’s Avg overlap, the overview’s coverage and the overlap matrices once carried cut-offs – an average overlap above 0.3, cell coverage under 25% or over 90% – with a legend note and four warnings, Step 2’s and Step 3’s; no source sets any of them, so the marks and the warnings are gone and the numbers stay (no band without a source). The overlap matrices keep only their shaded diagonal, which marks each bicluster against itself and grades nothing.

Step 3: Run full analysis

Noise is no cluster: every index but DBCV reads the clustered cases alone, and fewer than two clusters stop the card. The silhouette, Davies–Bouldin, Dunn, Calinski–Harabasz, the sums of squares and the variable contribution compare clusters with one another, and a noise case belongs to none; scoring the noise as a cluster of its own – the label 0 the fit gives it – would grade a scatter of the sparsest cases as a group. So under DBSCAN and HDBSCAN they are computed on the clustered cases alone, the contribution’s df taken from the clusters found and the clustered n, and a note under the validity table says so. That lets a solution look well cut by leaving its hard cases out, which DBCV is there to weigh against. A fit with no cluster or one has no partition to grade, so the card stops at the fit, its density section and a warning, as a collapsed FANNY fit does.

DBCV is computed over every case, and withheld under Gower. Moulavi et al.‘s (2014) index sets each cluster’s density sparseness – the longest edge of a minimum spanning tree over its members’ mutual reachability distances – against its density separation from the nearest other cluster, and weights each cluster by its share of all the objects, noise included, so a solution that labels many cases noise scores lower: it is the one index on the card that charges a solution for what it leaves out. Its core distance raises the nearest-neighbour distances to the power of the data’s dimension, which dbscan::dbcv() cannot read off a dissimilarity, so the run passes the analysis matrix’s column count; Gower’s coefficient has no dimension, and there the index is withheld with a hint. No source sets bands for it, so the table reads it only as higher-better.

HDBSCAN’s membership strength is the hdbscan library’s, not the dbscan package’s. dbscan::hdbscan() returns a membership_prob that ranks core distances within each cluster – the cluster’s largest core distance less the case’s, over that largest – so the sparsest clustered case gets 0 and no case reaches 1, whatever the hierarchy. The module computes instead the quantity the hdbscan library reports (McInnes, Healy and Astels, 2017): with λ = 1/eps, a case’s strength is min(λ_p, λ_death(C)) / λ_death(C), where λ_p is the density at which the case leaves its selected cluster C and λ_death(C) the density at which C itself splits or loses its last cases – so a case still in C when C ends has strength 1, as has a duplicated case, whose eps is 0. No paper defines this per-case ratio; Campello et al. (2015) define the λ involved only inside the cluster stability. It is called a strength, never a probability, since nothing makes it one; a noise case’s is 0, and the sizes table reports each cluster’s median.

HDBSCAN’s per-cluster stability is its own selection criterion. The Stability column is the fit’s cluster_scores, the stability Campello, Moulavi and Sander (2013) maximise in choosing the flat clustering from the hierarchy: the sum over a cluster’s cases of the density span each spends in it, λ_p − λ_birth(C). It carries the data’s scale through λ = 1/eps and grows with the cluster’s size, so it compares the clusters of one run and grades nothing on its own; it is not the resampling stability of the bootstrap, which HDBSCAN does not offer.

GLOSH is reported as a distribution, with no cutoff. GLOSH (Campello et al., 2015, §6) scores each case by how far its own density falls short of the densest point of the cluster it belongs to or last belonged to, on [0, 1). Its source reads the scores as a ranking, looking for gaps (p. 5:29), and fixes no threshold; the hdbscan library’s documentation cuts at the 90th percentile as an illustration, not a rule. So the card prints the minimum, the quartiles, the 90th percentile and the maximum and flags no case, and the scores themselves go to the dataset with the insert. They are the fit’s outlier_scores, which equal dbscan::glosh() at k = minPts.

The condensed tree draws the fit’s own hierarchy, with duplicated cases at the deepest finite level. The branches, their birth and death densities and the cases each loses are read from the hdbscan fit itself, so the plot shows the hierarchy the clusters were selected from rather than a re-estimate. A case duplicated in the data has core distance 0 and so an infinite λ; it is drawn at the deepest finite λ of the tree, where the axis ends.

The uncertain-case lines read 0.5 under FANNY and 0.8 under a mixture, and grade nothing. Under FANNY the cut is definitional: the memberships sum to 1, so an object whose largest membership is below 0.5 belongs to no cluster by a majority, and the line counts those objects; the membership plot draws the same level as its guide. A mixture’s posteriors have no such landmark – a largest posterior below one half is possible only from k = 3 – so 0.8 is the app’s own reporting cut, from no source: the line counts, colours nothing and gives no verdict, and the full posteriors go to the dataset with the insert, where any other cut can be applied. The uncertainty plot sizes and shades its points from 0 to 1 − 1/k, the most uncertain a case can be among k components, rather than to the run’s own maximum, so two runs at the same k draw on one scale. Each object’s memberships or posteriors are drawn and inserted rather than tabled, since a table of n rows by k columns on the card would hold nothing the plot and the dataset do not.

Every model’s BIC at the chosen k is tabled, and ΔBIC is read on Raftery’s grades. The card names the fitted model, and the table of all fourteen at k shows how close the alternatives came – a model a few units behind is as defensible as the one reported. ΔBIC is each model’s distance from the largest, and with interpretation on it is graded on Raftery’s (1995) grades of evidence against the model, the shared rule, the fitted model Preferred (the best model is “preferred”). A model mclust could not fit at k – a singular covariance, typically, when a component has too few cases for its free parameters – has no BIC and is listed last.

The mixture’s component table reports its own estimates, not the assigned cases’ means. mclust’s means and mixing proportions weight each case by its posterior probability – the estimates the likelihood maximises – while the cluster profiles average the cases assigned to each component outright; the two differ exactly where components overlap, so both are kept, the component table describing the model and the profiles the partition the indices grade. Means fitted on standardized variables are transformed back with each variable’s own centre and standard deviation, which leaves a mean’s meaning intact. Per-case scaling has no such inverse – each case’s centre or norm is its own – so under it each component mean is the posterior-weighted mean of the raw cases, ∑izikxi/∑izik, which keeps the table on the variables’ scale.

The silhouette is read against Kaufman and Rousseeuw’s bands, per cluster as well as overall, and the cophenetic correlation against Rohlf’s. The average silhouette width is labelled strong above 0.70, reasonable above 0.50, weak above 0.25 and no substantial structure at or below – Kaufman and Rousseeuw’s reading, whose table prints closed ranges (≤ .25, .26–.50, .51–.70, .71–1), so an exact .25, .50 or .70 stays in the band below (boundaries follow the source); the best-k caveat accordingly asks whether any k exceeds .25. The per-cluster averages of the sizes table come from the same cluster::silhouette() call, so they appear whenever the silhouette is computed, for the validity row or the silhouette plot, and are graded on the same bands – an extension the legend names as the app’s, since the table was written for the overall average. Negative silhouettes are counted per cluster and overall, in R beside the per-cluster averages, with no verdict: Rousseeuw (1987) reads each negative s(i) as an object probably in the wrong cluster, not a share of them, so the earlier warning at more than 10% of the objects, a cut no source sets, is gone. The cophenetic correlation grades how faithfully the tree’s merge heights reproduce the input dissimilarities, a property of the tree rather than of any cut, so it has no checkbox and is the same for every k. Its bands are Rohlf’s – very good from 0.9, good from 0.8, poor from 0.7, very poor below, each cut a floor as printed – cited as Mohammadi and Prasanna (2003, p. 1240) give them, since Rohlf’s NTSYS-pc manual could not be obtained; they replace an uncited 0.75 “good fit” mark. The legend carries two caveats: Mohammadi and Prasanna’s own, that a low value indicates distortion rather than a useless dendrogram, and Holgersson’s (1978, p. 287), that the coefficient is a misleading criterion of goodness of fit when the clusters are poorly separated, owing to its large variability there.

Cluster stability is Hennig’s clusterboot: distinct resampled objects, every object classified back. Silhouette, Calinski–Harabasz and the other indices grade the partition on the sample that produced it and cannot tell a real group from a lucky cut; the bootstrap asks whether the cluster would appear again in another sample (Hennig, 2007). Each replicate draws the objects with replacement and keeps the distinct ones, since a duplicated object would pull a centroid towards itself; reclusters them with the run’s own algorithm and settings; and classifies every object of the full data to its nearest bootstrap representative in the run’s own dissimilarity – the k-means centroids, the PAM medoids, the hierarchical cut’s cluster means, or its medoids under Gower. Each original cluster is then matched to its best counterpart by Jaccard over whole sets, so every replicate whose refit succeeds scores every cluster. Hennig’s bands read the mean: 0.85 highly stable, 0.75 stable, 0.60 a pattern with doubtful membership, below that not trustworthy; a replicate at 0.5 or less counts as dissolved and one strictly above 0.75 as recovered, the inequalities fpc::clusterboot and Hennig (2006) use, so a replicate at exactly 0.75 is neither. In variable mode the resampled units are the cases the dissimilarity is built from, so every variable is in every replicate and the bootstrap solution is itself the assignment. Replicates follow the bootstrap seed in Settings.

Under a mixture the bootstrap refits the reported covariance model and classifies by posterior; under FANNY it classifies to the refit’s medoids. Each replicate refits Mclust at k with the covariance model held at the one the card reports rather than reselected among all fourteen: reselection would cost fourteen fits a replicate, and the Jaccard is to score the solution the card shows, not the model choice as well. A mixture assigns by posterior rather than by nearest representative, so every object of the full data is classified by the bootstrap fit’s own predict(), its most probable component, before the clusters are matched. FANNY keeps no centre, so each bootstrap fit is represented by the medoid, on the run’s dissimilarity, of each of its largest-membership clusters, and every object is classified to the nearest; a cluster no object leads in a replicate has no medoid there. In variable mode the refit’s assignment is itself the answer, as under the other algorithms, and the consensus partition reads the same assignments.

Under DBSCAN, stability subsamples instead of bootstrapping, with eps re-set to the full data’s core share. The bootstrap above keeps each resample’s distinct objects, about 63% of them, which thins the density everywhere: at the run’s eps and minPts a resample loses core points, and clusters dissolve from the resampling rather than from any instability. fpc::clusterboot’s DBSCAN interface keeps both parameters fixed and has the same flaw, and no published scheme rescales DBSCAN’s parameters for a resample. Each replicate therefore draws 80% of the cases without replacement – the subsampling fraction of Monti et al. (2003, p. 105) – holds minPts, and re-sets eps to the quantile of the subsample’s (minPts − 1)-nearest-neighbour distances, on the run’s dissimilarity, that the run’s eps holds in the full data, so the subsample has the full data’s share of core cases. That calibration is the app’s own, built on three sources: Rinaldo et al. (2012, p. 913) index a density level by the mass above it rather than by its height, Levine and Domany (2001, p. 2584) rescale the clustering parameter empirically across resamples, and Zimek et al. (2013, p. 431) note that subsampling inflates every k-nearest-neighbour distance alike. The subsample’s own clustering is the answer for the cases it drew, so no case is classified back – predict() on a fit from a Gower dissimilarity silently falls back to Euclidean distance on the factors’ integer codes – and a cluster C is scored by Hennig’s (2007, p. 261) Jaccard over the drawn cases, C ∩ X*, against the subsample’s real clusters alone, since noise is never a cluster to match (Hennig, 2008, p. 1158); a subsample that found no cluster scores 0, and the mean runs over the subsamples that drew at least one of C’s cases. Noise gets no stability score. HDBSCAN takes neither stability nor the consensus partition: it has no eps to recalibrate, and no source gives it a resampling scheme.

Cluster sizes carry no stability verdict, and the pointer to the stability check speaks for the whole solution. No source sets a size below which a distance-based cluster turns unstable: stability follows a cluster’s separation and homogeneity, not its size – “in the same clustering, some clusters may be very stable and others may be extremely unstable” (Hennig, 2007). So the line under the sizes table describes the smallest cluster – its n, its share and the largest-to-smallest ratio – and grades nothing; the resampling is what measures stability, and when it ran, the smallest cluster’s mean Jaccard is read beside it. When it did not, the pointer names no cluster and shows whatever the sizes, equal ones included, since a clustering that changes strongly under slight changes of the data warrants no strong interpretation of any of its clusters (Hennig, 2015). The pointer names Hennig (2007) in its text but adds nothing to the citation list, which cites only what the run computed.

The consensus partition is evidence accumulation, cut by average linkage and renumbered onto the reported solution. The replicates stability draws are reused, so asking for both costs one loop: each replicate’s assignment adds to a co-association count for every pair of objects, divided at the end by the replicates whose fit succeeded (Fred and Jain, 2005). The consensus partition is hclust(as.dist(1 − C), "average") cut at the run’s k; a tree cut numbers its clusters by tree position, so each consensus cluster is renamed after the reported cluster it overlaps most, largest overlap first, which puts agreement on the crosstab’s diagonal. Agreement is the adjusted Rand index of that crosstab, read against Steinley’s (2004, p. 392) bands – above 0.90 excellent, above 0.80 good, above 0.65 moderate – with a warning at or below 0.65. He prints each band as “greater than” its cut, so an exact cut stays in the band below; his “less than 0.65” for the poor band leaves 0.65 itself unassigned, and placing it there is the app’s convention. His bands grade the recovery of a known partition and are read here as the agreement of two estimated ones; PAC is the share of pairs whose co-association lies strictly between 0.1 and 0.9 (Şenbabaoğlu et al., 2014); and each cluster’s mean co-association is Monti et al.'s (2003) cluster consensus, the mean over the distinct pairs inside it, undefined for a singleton.

Under DBSCAN the consensus divides by co-sampled pairs and never co-clusters noise. A subsample draws a given pair only some of the time, so a pair’s co-association is the share of the subsamples drawing both cases that put them in one cluster – Monti et al.‘s (2003, eq. 2, p. 96) denominator – rather than a share of every replicate. A pair counts as co-clustered only when both cases share a real cluster: noise is coded 0, and the equality test the other algorithms’ ensemble uses would put any two noise cases in one cluster. A case that was noise in at least half the subsamples drawing it is consensus noise, a majority rule of the app’s own; the other cases are cut by average linkage on 1 − C at the number of clusters found, as under the other algorithms, and the cluster consensus and PAC are taken over them. The adjusted Rand against the reported solution counts each noise case as a cluster of its own, so a pair with a noise member is always apart – the standard formula, the noise adding to n alone – and the crosstab gains a Noise row and column. When fewer cases than the clusters found stay outside the consensus noise, no partition is cut. Each case’s noise frequency is inserted with the assignments, the record of which cases the ensemble could not place.

The sums of squares are Euclidean on the analysis matrix, and the variable contribution F is descriptive. Within and between sums of squares are centroid quantities, so whatever the metric they are taken around the cluster means of the matrix the run clustered – standardized or per-case scaled when a standardization ran, transposed in variable mode – and under Gower, which has no mean, they are withheld. The contribution table is a one-way ANOVA of each variable on the original scale across the clusters, with df k − 1 and n − k and η2=SSbetween/SStotal; since the partition was chosen to separate these variables, the F is large by construction and no p-value is printed.

Multidimensional scaling reports the fit each method optimises, and is capped at 1,000 objects. Classical scaling is cmdscale(d, k = 2, eig = TRUE), and its goodness-of-fit is GOF[1], taken over the absolute eigenvalues so that a non-Euclidean dissimilarity’s negative eigenvalues count against the two axes rather than being dropped; it has no stress to report. Non-metric scaling is MASS::isoMDS() started from the classical solution, and its stress-1 – returned as a percentage and divided by 100 – is read against Kruskal’s (1964a, p. 3) anchors – 0.20 poor, 0.10 fair, 0.05 good, 0.025 excellent. He prints points rather than ranges, and his own worked readings (pp. 19, 21) describe a value between two anchors by both their words, so the card does the same: an exact anchor takes its own word, a value between two takes the pair – good to excellent, fair to good, poor to fair – and only 0.20 and above reads plain poor, where the earlier bands called everything past 0.10 poor. Both run in compiled code that never polls for an interrupt, so the plot is bounded up front rather than cancelled: at 1,000 objects cmdscale took about 1.6 s and isoMDS about 14 s on the engine, both growing cubically. At most 40 labels are drawn, furthest from the centre first, since past that they stop naming anything.

The biplot uses Gabriel’s distance-preserving scaling on the clustering matrix. prcomp() runs centred but unscaled on the matrix the clustering itself ran on, so the picture is of the geometry the run used; the points are the component scores and the arrows the raw loadings, which is the one scaling of Gabriel’s (1971) family under which the distances between plotted cases approximate the distances the clustering saw. The alternative, covariance-preserving scaling, makes arrow lengths read as standard deviations at the cost of distorting exactly the separation the plot exists to show. Loadings are unit vectors and scores are in data units, so one common factor stretches the longest arrow to 85% of the cloud’s extent – arrow lengths compare with each other, not with the axes. It is withheld under Gower, whose mixed-type frame has no principal components, and in variable mode, where the variables are already the points; past 5,000 cases the cloud is strided within each cluster, keeping every cluster’s share.

Optimal leaf ordering is exact. It is Bar-Joseph et al.'s (2001) algorithm, computed in R by the module, which finds the rotation of every branch that minimises the summed dissimilarity between neighbouring leaves; being exact rather than heuristic, it costs around a second at 200 objects and tens of seconds by 800, more under single linkage.

The bicluster tables read the analysis matrix, except the profiles, and MSR is read against the matrix’s own. Mean value, MSR and the coherence columns are computed on the matrix the algorithm ran on – z-scores when the run standardized – while the bicluster profiles report means on the original scale, which is why the summary column is marked (z) then. MSR carries the matrix’s scale, so a bare value says nothing; the ratio to the whole matrix’s MSR is below 1 exactly when the block is more coherent than the matrix. Avg r leaves out a row constant across the block’s columns, whose correlation is undefined.

The heatmap’s dendrograms are Ward trees on Euclidean distances, and the grid is bounded. Rows and columns are ordered by hclust(dist(x), "ward.D2") on the analysis matrix and its transpose, whatever the biclustering algorithm. The grid is an overview, so past 320 rows – a 640-pixel grid at two pixels a row – the rows are sampled evenly in dendrogram order, each drawn cell still one real observation, and the row dendrogram is withheld since its leaves would not line up; past 8,000 drawn cells the per-cell tooltips cost more than they are worth and are left off.

Missing data

Cases are dropped listwise over the variables the run keeps, whatever the missing-data setting says. Every output of a run rests on one set of objects – the partition, its silhouettes and sums of squares, the tendency tests, the bootstrap’s co-assignment counts – and kmeans(), prcomp() and cmdscale() take no blank at all. A matrix assembled pairwise, each dissimilarity over the variables its two cases share or, in variable mode, each correlation over its own complete cases, would set side by side distances measured on different data, and the validity indices would describe no sample that exists. So the module takes the complete cases before anything reaches R, and the setting’s pairwise default is not honoured here. The pass runs over the variables the run keeps – after the non-numeric ones are split off under an ordinary metric, over every selected variable under Gower – so a column the run never reads costs no cases, and constant variables are judged on the complete cases afterwards. Listwise and imputation are honoured because they act on the dataset before the module sees it. The complete cases carry their original row numbers through the run, so an inserted assignment or membership lands on the case it belongs to and a dropped case stays blank.