Learn R Programming

clustrd (version 0.1.2)

ReducedKM: ReducedKM

Description

Implements Reduced k-means (De Soete and Carroll, 1994) which combines k-means for clustering with PCA for dimension reduction.

Usage

ReducedKM(data, nclus, ndim, nstart = 100, smartStart = FALSE)

Arguments

data
quantitative dataset
nclus
number of clusters
ndim
dimensionality of the solution
nstart
number of starts
smartStart
If TRUE then starting values are obtained with k-means

Value

obscoord
object scores
attcoord
variable loadings
centroid
cluster centroids
cluID
cluster membership
criterion
optimal value of the objective function

References

De Soete, G. and Carroll, J. D. (1994). K-means clustering in a low-dimensional Euclidean space. In Diday E. et al. (Eds.), New Approaches in Classification and Data Analysis, Heidelberg: Springer, 212-219.

See Also

FactorialKM

Examples

Run this code
   data(macro)
   macro = data.frame(scale(macro, center = TRUE, scale = TRUE))
   outr <- ReducedKM(macro,3,2,nstart=1,smartStart=TRUE)
   plotrd(outr,what=c("all","none"),obslabel=rownames(macro),density=FALSE)

Run the code above in your browser using DataLab