cluster {drclust}R Documentation

classification variable

Description

Recodes the binary and row-stochastic membership matrix U into the classification variable (similar to the "cluster" output returned by kmeans()).

Usage

cluster(U)

Arguments

U

Binary and row-stochastic matrix.

Value

cl

vector of length n indicating, for each element, the index of the cluster to which it has been assigned.

Author(s)

Ionel Prunila, Maurizio Vichi

Examples

# Iris data 
# Loading the numeric variables of iris data
iris <- as.matrix(iris[,-5]) 

# standardizing the data
iris <- scale(iris)

# double k-means with 3 unit-clusters and 2 components for the variables
p1 <- redkm(iris, K = 3, Q = 2)
cl <- cluster(p1$U)


[Package drclust version 0.1 Index]