Learn R Programming

mvc (version 1.3)

conceptVectorsSkm: Calculate concept vectors for Spherical k-Means as unit length sum of vectors of the k clusters.

Description

Calculate concept vectors for Spherical k-Means as unit length sum of vectors of the k clusters.

Usage

conceptVectorsSkm(X, CIdx, doOutput=F)

Arguments

X
data matrix (row-wise in unit length).
CIdx
vector of length NROW(X) with natural numbers 1..k, indicating cluster for each data vector.
doOutput
whether progress bar indicators should be output

Value

Examples

Run this code
X=structure(c(1, 1, -1, 0, 1, 0, -1, -1), .Dim = c(4L, 2L))
CIdx=c(1, 1, 2, 2)
C=conceptVectorsSkm(X,CIdx)
dput(C) 
# structure(c(0.894427190999916, -0.447213595499958, 
# 0.447213595499958, -0.894427190999916), .Dim = c(2L, 2L))
}

Run the code above in your browser using DataLab