Why do `Distribution` classes in PyroPPL have a `log_prob()` method but not a `prob()` method?

48 views Asked by At

In PyroPPL, there exists an abstract Distribution class that has a sample() method and a log_prob() method. The log_prob() method allows you to evaluate the log probability density for the distribution for a given scalar or array of values. I'm surprised that there is no prob() method though. This means that whenever you wish to evaluate the probability density you need to daisy chain a log_prob() method and a exp() method. What is the reason for not having a prob() method? Is it right to assume that evaluating probability densities for a given distribution would be a common operation?

I am fairly new to PPL's so is this a common choice in other PPL's?

0

There are 0 answers