View source: R/sampleClustering.R
nameClusters | R Documentation |
Assign a class name to each cluster obtained by unsupervised or semi-supervised classification, thanks to the use of a training set and the majority rule method.
nameClusters(data.sample, method, RclusTool.env = initParameters())
data.sample |
list containing features, profiles and clustering results. |
method |
character vector specifying the clustering method (already performed) to use. |
RclusTool.env |
environment in which all global parameters, raw data and results are stored. |
nameClusters assigns a class name to each cluster obtained by unsupervised or semi-supervised classification, thanks to the use of a training set and the majority rule method
data.sample list containing features, profiles and clustering results with updated labels names.
## Not run:
dat <- rbind(matrix(rnorm(100, mean = 0, sd = 0.3), ncol = 2),
matrix(rnorm(100, mean = 2, sd = 0.3), ncol = 2),
matrix(rnorm(100, mean = 4, sd = 0.3), ncol = 2))
tf1 <- tempfile()
write.table(dat, tf1, sep=",", dec=".")
x <- importSample(file.features=tf1)
x <- computeUnSupervised(x, K=3, method.name="K-means")
nameClusters(x, method = "K-means_preprocessed")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.