Skip to contents

For each candidate bandwidth h.grid[i] and class number k.grid[j], runs ljmds.pipeline() and computes the functional Rousseeuw silhouette of the resulting partition. Returns the grid of silhouette values and the maximizer over (h, k).

Usage

ljmds.select(X, t, h.grid, k.grid = 3:6)

Arguments

X

Integer/numeric n x p matrix of 0/1 keyword occurrences.

t

Numeric vector of length n.

h.grid

Numeric vector of candidate bandwidths.

k.grid

Integer vector of candidate class numbers; the default 3:6 excludes the trivial k = 2 split.

Value

A list with class "ljmds.sel":

  • S: matrix of silhouette values, rows = h.grid, cols = k.grid,

  • h.hat, k.hat: maximizer over the supplied grid,

  • S.hat: silhouette at the maximizer,

  • h.grid, k.grid.

Details

The trivial k = 2 split typically gives a silhouette value larger than any admissible (k >= 3) cell, and k = 1 is not a partition at all. Both are excluded by simply not putting them into k.grid; the default k.grid = 3:6 already does so.

See also

ljmds.pipeline() to run the analysis at the chosen (h, k), ljmds.silhouette() for the criterion used here, plot.ljmds.sel() to visualise the grid of silhouette values.