arthurai.util.normal_random_ints_fixed_sum#

arthurai.util.normal_random_ints_fixed_sum(num_values, total_sum, relative_std_dev=0.5)#

Return num_values roughly normally-distributed integers summing to total_sum. Numbers are first sampled from the normal distribution, then adjusted to fit the sum. Adjustments are made first by shifting the resulting distribution to be at least total_sum, then decrementing a subset of the values to match total_sum. :type num_values: int :param num_values: number of integers to return :type total_sum: int :param total_sum: total sum the integers returned :type relative_std_dev: float :param relative_std_dev: the relative standard deviation (std_dev / mean) of the initial distribution. :rtype: ndarray :return: