code: public static MinibatchLbfgs createAdaptiveSchedule(int numVectorsInApproximation,
        double l2Regularization, int numExamples, int initialMinibatchSize,
        int iterationsPerMinibatch, LogFunction log) {
      int numBatches = (int) Math.ceil(Math.log(((double) numExamples) / initialMinibatchSize) / Math.log(2));
      int[] minibatchSize = new int[numBatches];
      int[] maxIterationsPerMinibatch = new int[numBatches];
      
      minibatchSize[0] = initialMinibatchSize;
      for (int i = 1; i < numBatches; i++) {
        minibatchSize[i] = minibatchSize[i -1] * 2;
      }
      minibatchSize[numBatches - 1] = numExamples;
      
      Arrays.fill(maxIterationsPerMinibatch, iterationsPerMinibatch);
      
      return new MinibatchLbfgs(numVectorsInApproximation, l2Regularization, minibatchSize,
          maxIterationsPerMinibatch, log);
    }
docs: Creates a minibatch LBFGS trainer that adaptively increases the number of
  examples in each minibatch as training progresses. Each iteration doubles
  the number of examples in the batch, with the first batch containing
  {@code initialMinibatchSize} examples. Each minibatch is optimized with
  LBFGS for {@code iterationsPerMinibatch} iterations.
  
  @param numVectorsInApproximation
  @param l2Regularization
  @param numExamples
  @param initialMinibatchSize
  @param iterationsPerMinibatch
  @param log
  @return