partial randomization of input matrix in fraction [0,1]