# NOT RUN {
## generate data of 3 types with clear difference
dt1 = aux.gensamples(n=33)-100
dt2 = aux.gensamples(n=33)
dt3 = aux.gensamples(n=33)+100
## merge the data and create a label correspondingly
X = rbind(dt1,dt2,dt3)
label = c(rep(1,33), rep(2,33), rep(3,33))
## try different numbers for neighborhood size
out1 = do.kmfa(X, label, k1=5, k2=5, t=1)
out2 = do.kmfa(X, label, k1=5, k2=5, t=2)
## visualize
opar = par(no.readonly=TRUE)
par(mfrow=c(1,2))
plot(out1$Y, main="bandwidth=1")
plot(out2$Y, main="bandwidth=2")
par(opar)
# }
Run the code above in your browser using DataLab