nameClusters: Clusters renaming

View source: R/sampleClustering.R

nameClustersR Documentation

Clusters renaming

Description

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.

Usage

nameClusters(data.sample, method, RclusTool.env = initParameters())

Arguments

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.

Details

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

Value

data.sample list containing features, profiles and clustering results with updated labels names.

Examples

## 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)

RclusTool documentation built on May 29, 2024, 5:23 a.m.