Closed patel-zeel closed 2 years ago
Hi - This is intentional. The input probabilities are (of course) not allowed to be negative. To indicate that there's a mistake with the inputs, the samples are -1 when that is the case.
Note that the logits can be either negative or positive, so when fitting parameters to data, you may want to optimize with respect to the logits if you prefer to have unconstrained optimization.
I am closing the issue.
Thank you for the clarification @franrruiz :)
Hi, I have noticed that
distrax.Categorical
normalizes the probabilities by their summation. For example,output
This can go wrong at places, especially while fitting the parameters of this distribution to data. For example,
output
And now,
gives,
I am not sure if this is done on purpose due to some benefits or this distribution can be improved to correct this behaviour.