google-deepmind / google-deepmind/optax

Rename `optax.perturbations` distribution method `log_prob` to `unnormalized_log_prob`

Open
#1,214 8 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.