This function implements the interaction clustering part of the Least Squares Bilinear Clustering method of Schoonees, Groenen and Van de Velden (2014).
int.lsbclust(data, margin = 3L, delta, nclust, ndim = 2,
fixed = c("none", "rows", "columns"), nstart = 50, starts = NULL,
alpha = 0.5, parallel = FALSE, mc.cores = detectCores() - 1,
maxit = 100, verbose = 1, method = "diag", minsize = 3L,
return_data = FALSE)
A three-way array representing the data.
An integer giving the single subscript of data
over which the clustering
will be applied.
A four-element binary vector (logical or numeric) indicating which sum-to-zero constraints must be enforced.
An integer giving the desired number of clusters. If it is a vector, the algorithm will be run for each element.
The required rank for the approximation of the interactions (a scalar).
One of "none"
, "rows"
or "columns"
indicating whether to fix neither
sets of coordinates, or whether to fix the row or column coordinates across clusters respectively.
If a vector is supplied, only the first element will be used.
The number of random starts to use.
A list containing starting configurations for the cluster membership vector. If not supplied, random initializations will be generated.
Numeric value in [0, 1] which determines how the singular values are distributed between rows and columns.
Logical indicating whether to parallelize over different starts or not.
The number of cores to use in case parallel = TRUE
, passed to
makeCluster
.
The maximum number of iterations allowed.
Integer controlling the amount of information printed: 0 = no information, 1 = Information on random starts and progress, and 2 = information is printed after each iteration for the interaction clustering.
The method for calculating cluster agreement across random starts, passed on
to cl_agreement
. None is calculated when set to NULL
.
Integer giving the minimum size of cluster to uphold when reinitializing empty clusters.
Logical indicating whether to include the data in the return value or not
An object of class int.lsb
# NOT RUN {
data("supermarkets")
out <- int.lsbclust(data = supermarkets, margin = 3, delta = c(1,1,0,0), nclust = 4, ndim = 2,
fixed = "rows", nstart = 1, alpha = 0)
# }
Run the code above in your browser using DataLab