This extension of findFeasibleMatrix
attempts to
create a feasible matrix where a certain proportion of the entries
is positive. There is no guarantee that this proportion is
achieved. If it is not possible then this matrix will report a warning
and simply return the matrix constructed by findFeasibleMatrix.
findFeasibleMatrix_targetmean(r, c, p, eps = 1e-09, targetmean = 0.3)
vector of row sums (nonnegative
vector of column sums (nonnegative)
matrix of probabilities (must be in [0,1]), matching the dimensions of r and c. Values of p=0 are interpreted that the corresponding matrix elements have to be 0. Note: p=1 does not force the corresponding matrix element to exist.
row and col sums can at most be different by eps. Default 1e-9.
Average proportion of positive entries of the resulting matrix. Defaults to 0.3