Learn R Programming

RclusTool (version 0.91)

extractProtos: Prototypes extraction

Description

Extract prototypes of each cluster automatically, according to a clustering result, and save them in different directories. In order to catch the whole variability, each cluster is divided into several sub-clusters, and medoids of each sub-cluster are considered as prototypes.

Usage

extractProtos(data.sample, method, K.max = 20,
  kmeans.variance.min = 0.95, user.name = "")

Arguments

data.sample

list containing features, profiles and clustering results.

method

character vector specifying the clustering method (already performed) to use.

K.max

maximal number of clusters (K.max=20 by default).

kmeans.variance.min

elbow method cumulative explained variance > criteria to stop K-search.

user.name

character vector specifying the user name.

Value

csv file containing the prototypes

Details

extractProtos extracts prototypes automatically according to a clustering result, and save them in different directories

Examples

Run this code
# 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, dir.save=tempdir())
x <- computeUnSupervised(x, K=3, method.name="K-means")

extractProtos(x, method = "K-means_preprocessed")


# }

Run the code above in your browser using DataLab