def bulk_benchmark_estimator(estimator, X_test, n_bulk_repeats, verbose):
 n_instances = X_test.shape[0]
 runtimes = np.zeros(n_bulk_repeats, dtype=np.float)
 for i in range(n_bulk_repeats):
  start = time.time()
  estimator.predict(X_test)
  runtimes[i] = (time.time() - start)
 runtimes = np.array(list(map((lambda x: (x / float(n_instances))), runtimes)))
 if verbose:
  print('bulk_benchmark runtimes:', min(runtimes), scoreatpercentile(runtimes, 50), max(runtimes))
 return runtimes

def bulk_benchmark_estimator ( estimator , X_test , n_bulk_repeats , verbose ) : n_instances = X_test . shape [ 0 ] runtimes = np . zeros ( n_bulk_repeats , dtype = np . float ) for i in range ( n_bulk_repeats ) : start = time . time ( ) estimator . predict ( X_test ) runtimes [ i ] = ( time . time ( ) - start ) runtimes = np . array ( list ( map ( ( lambda x : ( x / float ( n_instances ) ) ) , runtimes ) ) ) if verbose : print ( 'bulk_benchmark runtimes:' , min ( runtimes ) , scoreatpercentile ( runtimes , 50 ) , max ( runtimes ) ) return runtimes
measure runtime prediction of the whole input .