ssKmeanspp: ssKmeanspp

Description Usage Arguments Value Author(s) References Examples

View source: R/ssKmeanspp.R

Description

Semi-supervised k-means++ (ss-k-means++ initialiation and Lloyd's algorithm).

Usage

1
ssKmeanspp(data, k, knownLabels, trueLabels, iter.max=100)

Arguments

data

data

k

number of groups

knownLabels

vector of indices of rows of x whose labels are known

trueLabels

length nrow(x) vector of true labels (only trueLabels[knownLabels] matter)

iter.max

maximum number of LLoyd's iterations

Value

centers

Final centers

cluster

Final cluster assignments

Author(s)

Jordan Yoder

References

http://arxiv.org/abs/1602.00360

Examples

1
2
3
4
5
6
7
8
library(ssClust)
data = matrix(runif(20),nrow=10,ncol=2)
knownLabels=c(1,2)
trueLabels=rep(NA,10)
trueLabels[1:2] = c(1,0)

res = ssKmeanspp(data, k=2,
		knownLabels=knownLabels, trueLabels=trueLabels) #note trueLabels are 0-indexed

Noobivsho/ssClust documentation built on Aug. 10, 2019, 5:47 a.m.