Learn R Programming

VBmix (version 0.3.2)

gmmkmsock:

Description

perform k-means specifically designed for a set of GMM (see references). At each iteration, sends information about current prototypes to a server via a socket connection (see references) for info about protocol.

Usage

gmmkmsock(models, names, ngroups, rho = new.env(), host = "127.0.0.1")

Arguments

models
list of GMM objects.
names
character vector with respective names of the GMM objects.
ngroups
(maximal) number of clusters.
rho
R environment object, used for calls to R functions within C code.
host
IP address of the server for the socket (port 1979).

Value

a set of GMM prototypes, and inferred labels (i.e. associated to the input objects).

References

Bruneau, P. , Picarougne, F. and Gelgon, M. (2010) _Interactive unsupervised classication and visu- alization for browsing an image collection_, Pattern Recognition, Volume 43, Number 2, Pages 485-493.

Examples

Run this code
temp1 <- sample(1:200, 150)
temp2 <- list()
for(i in 1:length(temp1)) temp2 <- appendToList(temp2, imgmods[[temp1[i]]])
temp3 <- imgnames[temp1]
# next command may be executed only if a server is running on 127.0.0.1:1979.
# temp4 <- gmmkmsock(temp2, temp3, 5)

Run the code above in your browser using DataLab