conceptVectorsSkm: Calculate concept vectors for Spherical k-Means as unit...

Description Usage Arguments Value Examples

View source: R/mvc-utils.R

Description

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

Usage

1
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

concept vectors as matrix (row-wise in unit length).

Examples

1
2
3
4
5
6
7
8
{
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))
}

mvc documentation built on May 2, 2019, 11:27 a.m.