code: 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)]);
    }
docs: 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.
  
  @param nrows number of rows to sample from.
  @param rate sampling rate
  @param sampler random "dice"
  @return an array contains numbers of sampled rows. The first element holds a number of sampled rows. The array length
  can be greater than number of sampled rows.