Inv_logit for multi-variate

techniques

#1

I know inv_logit(x) = exp(x) / 1 + exp(x). Is there a multivariate version for

p0 = 1 / 1 + sum(exp(x_i))

p1 = exp(x1) / 1 + sum(exp(x_i))

p2 = exp(x2) / 1 + sum(exp(x_i))

and so on


#2

Softmax


#3

That’s so cool. Thanks!


#4

It’s also built into our categorical_logit the same way we can take logit-scaled parameters in bernoulli_logit.