Closed pneuvial closed 7 years ago
Here's the code I used to find a seed that triggers this problem:
ii <- 1;
while(TRUE) {
print(ii);
set.seed(ii);
M <- getWeightMatrix(100, 0, 3, 15, sparse.coeff=0.7, contam.coeff=0.6, contam.max=2);
if (any(rowSums(M)>100)) break;
ii <- ii+1;
}
Fix by @mpierrejean : 52c616788935b1f48b05523f320ebd074078f590
Added a corresponding test script ("test_getWeightMatrix.R") : 0157e12cf9447592e2d268e32b392bfbf2f253d4
The function
getWeightMatrix
sometimes returns proportions larger than 100!I haven't digged in the code to see why this happens, but obviously it should not happen Reproducible example: