Learn R Programming

VBmix (version 0.3.2)

mixKnn:

Description

performs k-nearest neighbors over a collection of GMM. It uses jsmc to compute distances. Each elements in data is classified against all the others, and inferred class is compared to the true one (leave-one-out).

Usage

mixKnn(data, labels, n = 2, KLparam = 500)

Arguments

data
list of GMM.
labels
vector of numeric labels associated to data.
n
k of the algorithm.
KLparam
number of samples for jsmc.

Value

classification error ratio in [0,1].

See Also

mergeClassif constrClassif sampleClassif

Examples

Run this code
temp1 <- sample(1:200, 150)
temp2 <- list()
for(i in temp1) temp2 <- appendToList(temp2, imgmods[[i]])
temp3 <- imglabels[temp1]
# de-activated because this process is very long...
#temp4 <- mixKnn(temp2, temp3)

Run the code above in your browser using DataLab