I've been working with some large positive matrices for a machine learning problem I'm trying to solve. The problem involves multiplying a matrix $A$ that is a set of users and items, with a matrix $B$ that is a set of items and attributes. When we look at the columns of $B$, we see minimal correlations. However, when we create a new matrix, $C=A \bullet B$, we see that the columns of $C$ are highly correlated. This is clearly a problem for machine learning.
One thing that we've tried is normalization. It seems like centering and scaling the the features of $B$ to a standard normal distribution fixes the problem of high correlations. Also, in order to maintain the positive constraints, if we $L1$ norm the rows of $A$ and the columns of $B$, then the correlations do not appear in the final product.
The weirdness comes when we try to use $L2$ normalizations, which to me shouldn't be that different than $L1$. However, if we $L2$ norm the rows of $A$ and the columns of $B$, then the correlations still appear (although they're slightly weaker) ... This is intuitively very strange to me and I can't seem to figure out why this is.
Does anyone have any insight into what's going on here? I've included R code below that recreates the issue with random matrices.
library(corrplot)
# randomly generate strictly positive matrices
item_attributes <- matrix(runif(100000, min=0, max=1),1000,10)
users_items <- matrix(sample(0:1, 10000*1000, rep=T, prob=c(0.95, 0.05)),10000,1000)
# L1 Norm
item_attributes_l1 <- t(t(item_attributes)/abs(apply(item_attributes,2,sum)))
users_items_l1 <- users_items / abs(apply(users_items,1,sum))
# L2 Norm
item_attributes_l2 <- t(t(item_attributes)/sqrt(apply(item_attributes^2,2,sum)))
users_items_l2 <- users_items/sqrt(apply(users_items^2,1,sum))
# multiply the matrices
mat_prod <- users_items %*% item_attributes
mat_prod_l1 <- users_items_l1 %*% item_attributes_l1
mat_prod_l2 <- users_items_l2 %*% item_attributes_l2
# check for correlations in the final products
corrplot(cor(mat_prod), main='\ndot product')
corrplot(cor(mat_prod_l1), main='\nl1 norm')
corrplot(cor(mat_prod_l2), main='\nl2 norm')
apply(m, 2, function(x) x/sum(x))
in the future. $\endgroup$