Calculate partitions (concept indices) by assigning each vector to the closest concept vector.

Share:

Description

Calculate partitions (concept indices) by assigning each vector to the closest concept vector.

Usage

1
conceptIndicesSkm(X, C, doOutput=F)

Arguments

X

data matrix (row-wise in unit length).

C

matrix with k rows, indicating concept vectors (row-wise in unit length).

doOutput

whether progress bar indicators should be output

Value

concept indices as vector.

Examples

1
2
3
4
5
6
7
8
{ 
X=structure(c(1, 1, -1, 0, 1, 0, -1, -1), .Dim = c(4L, 2L))
C=structure(c(0.894427190999916, -0.447213595499958, 
0.447213595499958, -0.894427190999916), .Dim = c(2L, 2L))
CIdx=conceptIndicesSkm(X,C)
dput(CIdx) 
# c(1, 1, 2, 2)
}

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.