observe_categorical

function observe_categorical(x:Integer, ρ:Real[_]) -> Real

Observe a categorical variate.

  • x: The variate.
  • ρ: Category probabilities.

Returns: the log probability mass.