google-deepmind / google-deepmind/optax
Rename `optax.perturbations` distribution method `log_prob` to `unnormalized_log_prob`
Open
type:feature
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 369
- Avg merge
- 10h 15m
- Merged PRs (30d)
- 7
Description
Each distribution under [optax.perturbations](https://optax.readthedocs.io/en/latest/api/perturbations.html) has a method called `log_prob` that returns the logarithm of the _unnormalized_ probability density at a given point.
I propose renaming this method to `unnormalized_log_prob`, like in [TensorFlow Probability](https://www.tensorflow.org/probability/api_docs/python/tfp/distributions/Distribution#unnormalized_log_prob), so users don't confuse it with the actual (normalized) log probability.
If this is acceptable, I can submit a PR for it.
Contributor guide
Assessment
This issue has not been assessed yet.