tensorflow / tensorflow/probability
log_cdf not available in MultivariateNormalFullCovariance
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
In the distribution MultivariateNormalFullCovariance, the log_cdf is not available, because the event_shape is overriden. Is there an easy way to circumvent this? Why is this actually the case here?
Snippet to reproduce the issue (taken from the docs + added a log_cdf call:
from tensorflow_probability import distributions as tfd
b = tfd.Bernoulli(logits=tf.zeros([3, 5, 7, 9]))
b.batch_shape # => [3, 5, 7, 9]
b2 = b[:, tf.newaxis, ..., -2:, 1::2]
b2.batch_shape # => [3, 1, 5, 2, 4]
x = tf.random.normal([5, 3, 2, 2])
cov = tf.matmul(x, x, transpose_b=True)
chol = tf.cholesky(cov)
loc = tf.random.normal([4, 1, 3, 1])
mvn = tfd.MultivariateNormalTriL(loc, chol)
mvn.log_cdf(0.2) # <- errors
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided TensorFlow Probability snippet and tracing log_cdf on MultivariateNormalTriL and MultivariateNormalFullCovariance, focusing on the event_shape override mentioned in the report. Done means determining why log_cdf is unavailable and documenting or validating a supported way to handle the reported distribution behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100