# NOT RUN {
#Data generation
K <- 3
X <- matrix(rnorm(20*K),20,K)
W <- matrix(rnorm(30*K),30,K)
U <- matrix(rnorm(3*K),3,K)
Y = 0
for(k in 1:K) Y <- Y + outer(outer(X[,k],W[,k]),U[,k])
Y <- Y + array(rnorm(20*30*3,0,0.25),dim=c(20,30,3))
#Run the method with default options
# }
# NOT RUN {
res1 <- tensorBF(Y)
# }
# NOT RUN {
plotTensorBF(res = res1,Y=Y,k=1)
# }
Run the code above in your browser using DataLab