simulate_categorical

function simulate_categorical(ρ:Real[_]) -> Integer

Simulate a categorical distribution.

  • ρ: Category probabilities.