End-to-end wrapper that applies SOM clustering
(cluster_som()), then merges clusters by variable bin
thresholds (cluster_merge_bin()), and finally merges unimodal
neighbours (cluster_merge_unimodal()).
Usage
cluster_som_merge(
data,
vars = NULL,
thresholds,
x_dim = 10L,
y_dim = 10L,
rlen = 10L,
topo = "rectangular",
max_label_diff = 2L,
ignore_labels = NULL,
dip_threshold = 0.15,
min_mode_dist = NULL,
max_iterations = 50L
)Arguments
- data
matrix or data.frame. Rows are observations, columns are variables.
- vars
character vector or
NULL. Column names to use for clustering. IfNULL(default), all columns are used.- thresholds
named list. Passed to
cluster_merge_bin(). Each element is a numeric vector of threshold values for the variable given by the element name.- x_dim
integer(1). Number of columns in the SOM grid. Default
10L(matching FlowSOM).- y_dim
integer(1). Number of rows in the SOM grid. Default
10L(matching FlowSOM).- rlen
integer(1). Number of training iterations. Default
10L(matching FlowSOM).- topo
character(1). Grid topology passed to
kohonen::somgrid(). One of"rectangular"(default) or"hexagonal".- max_label_diff
integer(1). Passed to
cluster_merge_unimodal(). Default2L.- ignore_labels
character vector or
NULL. Passed tocluster_merge_unimodal(). DefaultNULL.- dip_threshold
numeric(1). Passed to
cluster_merge_unimodal(). Default0.15.- min_mode_dist
numeric or named numeric vector or
NULL. Passed tocluster_merge_unimodal(). DefaultNULL.- max_iterations
integer(1). Passed to
cluster_merge_unimodal(). Default50L.
Value
The list returned by cluster_merge_unimodal(), with
elements assign and label and a "thresholds" attribute.