compute_multinomial_mode(
probs,
total_count=1,
seed=None
)
Defined in edward/util/random_variables.py
.
Compute the mode of a Multinomial random variable.
probs
: 1-D Numpy array of Multinomial class probabilitiestotal_count
: integer number of trials in single Multinomial drawseed
: a Python integer. Used to create a random seed for the distribution# returns either [2, 2, 1], [2, 1, 2] or [1, 2, 2]
probs = np.array(3 * [1/3])
total_count = 5
compute_multinomial_mode(probs, total_count)
# returns [3, 2, 0]
probs = np.array(3 * [1/3])
total_count = 5
compute_multinomial_mode(probs, total_count)