choosenbclust | R Documentation |
choosenbclust
reports the cluster instability according to the number of clusters chosen.
choosenbclust(output, grid = 2:5, graph = TRUE, verbose = TRUE, nnodes = NULL)
output |
an output from the clusterMI function |
grid |
a vector indicating the grid of values tested for nb.clust. By default 2:5 |
graph |
a boolean indicating if a graphic is plotted |
verbose |
if TRUE, choosenbclust will print messages on console |
nnodes |
number of CPU cores for parallel computing. By default, the value used in the call to the clusterMI function |
The choosenbclust
function browses a grid of values for the number of clusters and for each one imputes the data and computes the instability.
a list of two objects
nb.clust |
the number of clusters in |
crit |
a vector indicating the instability for each value in the grid |
Audigier, V. and Niang, N., Clustering with missing data: which equivalent for Rubin's rules? Advances in Data Analysis and Classification <doi:10.1007/s11634-022-00519-1>, 2022.
imputedata
data(wine, package = "clusterMI")
require(parallel)
set.seed(123456)
ref <- wine$cult
nb.clust <- 3
wine.na <- wine
wine.na$cult <- NULL
wine.na <- prodna(wine.na)
# imputation
res.imp <- imputedata(data.na=wine.na, nb.clust = nb.clust, m = 5)
# pooling
nnodes <- 2 # number of CPU cores for parallel computing
res.pool <- clusterMI(res.imp, nnodes = nnodes, instability = FALSE)
# choice of nb.clust
choosenbclust(res.pool)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.