experiments.experiment_utils.make_batch_epoch_dict_min_sample_repeat

make_batch_epoch_dict_min_sample_repeat(niter_min, data_fracs, N_max, batch_size, num_repeats)

Convenience function for figuring out the number of epochs necessary to ensure that the number of iterations for each data frac is: max(niter_min,# of iterations such that each sample is seen num_repeat times)

Parameters:
  • niter_min (int) – The minimum total number of iterations you want run at every data_frac

  • data_fracs (np.ndarray) – 1-D array of data fractions

  • N_max (int) – The maximum number of data points in the optimization process

  • batch_size (int) – The fixed batch size

  • num_repeats (int) – The minimum number of times each sample must be seen in the optimization process

Return batch_epoch_dict:

A dictionary where keys are data fractions and values are [batch_size,num_epochs]