public static int [ ] sampleOOBRows ( int nrows , float rate , Random sampler ) { return sampleOOBRows ( nrows , rate , sampler , new int [ 2 + Math . round ( ( 1f - rate ) * nrows * 1.2f + 0.5f ) ] ) ; }
Sample out - of - bag rows with given rate with help of given sampler . It returns array of sampled rows . The first element of array contains a number of sampled rows . The returned array can be larger than number of returned sampled elements .