tensorflow / tensorflow/probability
Semi-definite Covariance Matrix For distributions
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hi all, recently I am dealing with state space model. For the transition equation x_t = Ax_{t-1} + W w_t, the w_t~N(0, I) is a multivariate normal distribution and W is a (possibly drop-rank) noise matrix. So I want to use MultivariateNormalLinearOperator to generate the a distribution object. For example, the state dimension is 6, W is 6x3 matrix, therefore, MultivariateNormalLinearOperator(loc=tf.zeros([6,]), scale=W) would raise Error when using .sample() because of incorrect dimension.
So I change to use MultivariateNormalFullCovariance with covariance matrix W @ tf.transpose(W). However, the covariance matrix not a full rank matrix, thus positive semi-definite. The nan samples happen when using .sample(). Is there any good method to solve this problem?
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 reproducing the reported .sample() behavior with MultivariateNormalLinearOperator, a 6-dimensional location, and a [6, 3] matrix W. Compare it with MultivariateNormalFullCovariance using W @ tf.transpose(W) and determine the expected handling of a positive semi-definite covariance; done should be a clear supported behavior or documented limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- tensorflow
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100