Expand matrix of cluster labels into matrix of clusters
expandMOC(clLabels, datasetNames = NULL)
clLabels | Matrix of cluster labels of size N x M. |
---|---|
datasetNames | Vector of cluster names of length M. Default is NULL. |
The output is a list containing:
the matrix of clusters.
a vector containing the dataset indicator.
an expanded vector of dataset names for the moc.
# Load data data <- list() data[[1]] <- as.matrix(read.csv(system.file("extdata", "dataset1.csv", package = "coca"), row.names = 1)) data[[2]] <- as.matrix(read.csv(system.file("extdata", "dataset2.csv", package = "coca"), row.names = 1)) data[[3]] <- as.matrix(read.csv(system.file("extdata", "dataset3.csv", package = "coca"), row.names = 1)) # Build matrix of clusters outputBuildMOC <- buildMOC(data, M = 3, K = 6, distances = "cor") # Extract matrix of clusters clLabels <- outputBuildMOC$clLabels # Impute missing values outputFillMOC <- fillMOC(clLabels, data = data) # Replace matrix of cluster labels with new (full) one clLabels <- outputFillMOC$fullClLabels # Expand matrix of cluster labels into matrix of clusters outputExpandMOC <- expandMOC(clLabels) clLabels <- outputExpandMOC$clLabels