Added code to de-mean the mixed weight matrix.