# NOT RUN {
## Univariate example: Co-clustering on simulated data
set.seed(12345)
X = simulateData(n = 30, p = 30, t = 15)
out = funLBM(X$data,K=4,L=3)
# Visualization of results
plot(out,type='blocks')
plot(out,type='proportions')
plot(out,type='means')
# Evaluating clustering results
ari(out$col_clust,X$col_clust)
ari(out$row_clust,X$row_clust)
## Multivariate example:
X = simulateData2(n = 50, p = 50, t = 15)
out = funLBM(list(X$data1,X$data2),K=4,L=3)
# Visualization of results
plot(out,type='blocks')
plot(out,type='proportions')
plot(out,type='means')
# Evaluating clustering results
ari(out$col_clust,X$col_clust)
ari(out$row_clust,X$row_clust)
## The following examples could take a few minutes to run
## and depend on the number of available CPU cores!
## Co-clustering on simulated data with parallel model selection
#X = simulateData(n = 30, p = 30, t = 15)
#out = funLBM(X$data,K=2:4,L=2:4,mc.cores = 4)
## Evaluating clustering results
#ari(out$col_clust,X$col_clust)
#ari(out$row_clust,X$row_clust)
## Co-clustering of Velib data
#data(Velib)
#out = funLBM(Velib$data,K=4,L=2)
## Visualization of results
#plot(out,type='blocks')
#plot(out,type='proportions')
#plot(out,type='means')
# }
Run the code above in your browser using DataLab