Imposing non-negativity
Both ddsimca.parafac and ddsimca.tucker can use a non-negativity constraint for the corresponding decomposition. Simply specify non.negative = TRUE when training a model. Here is an example for Tucker:
X3w[X3w < 0] <- 0
m1 <- ddsimca.tucker(X3w, "target", ncomp = c(3, 2, 3))
m2 <- ddsimca.tucker(X3w, "target", ncomp = c(3, 2, 3), non.negative = TRUE)
par(mfrow = c(1, 2))
plotFactors(m1, "B", comp = 1:2)
plotFactors(m2, "B", comp = 1:2)
detach(data3w)