WishartTriL does not support df \in (k - 1, k)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- machine-learning
Direzione di ricerca
Inizia con la costruzione tfd.WishartTriL mostrata nell'issue e verifica come valida df rispetto alla dimensione di scale_tril. Confronta il suo comportamento e logpdf con l'esempio Gamma fornito per k - 1 < df < k. Il lavoro è completato quando la costruzione è valida e il comportamento di logpdf è corretto in quell'intervallo, e il vincolo documentato è stato aggiornato di conseguenza.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
My understanding is that the Wishart distribution is well defined so long as df > k - 1. k is the dimension parameter, so the Wishart distribution has support over k x k matrices. df is the "degrees of freedom" parameter. However, the docs for WishartTriL indicate that it only supports df >= k. And when I try constructing a WishartTriL with k > df > k - 1, I get an error.
The fact that Wishart is supported for any df > k - 1 seems to be indicated in the distribution overview section of the wikipedia for InverseWishart, and in the wikipedia for the Wishart distribution, in the last paragraph of the "Spectral Density" section.
I have in mind that it would be useful to use a Wishart with df < k in order to express a very uncertain prior over the covariance of a multivariate normal distribution.
The scipy docs suggest that scipy's Wishart distribution supports construction with k - 1 < df < k. They do note, however, that the behavior of their sampling algorithm can create invalid samples sometimes when df < k, and advise users to check for invalid sample generation.
Here is a code example showing the problem:
import tensorflow_probability.substrates.jax.distributions as tfd
import jax.numpy as jnp
nu = 0.01
Lambda = jnp.array([[1.0]])
X = jnp.array([[0.5]])
scale_tril = jnp.linalg.cholesky(Lambda)
tfd.WishartTriL(nu, scale_tril)
Constructing this distribution causes an error.
This is despite the fact that it is possible to construct and evaluate logpdfs of the following Gamma distribution, even though (if I understand correctly) this 1D Gamma is equivalent to the above Wishart distribution:
tfd.Gamma(nu / 2, 1 / (2 * Lambda[0, 0]))
(You can check this equivalence by changing nu to something greater than 1, so you can construct the Wishart distribution, and test that the logpdf values for the two distributions are the same.)
I am using tensorflow_probability version 0.23.0.
Thank you for the help!
- Lingua principale
- Jupyter Notebook
- Stelle
- 4.4k
- Fork
- 1.1k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di tensorflow/probability
-
KL divergence between two `TransformedDistribution`s with a shared non-injective bijector (`AbsoluteValue`) returns the base KLForse già presa @Andreas-Hum l’ha presa 8 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
tensorflow/probability#2036 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
tensorflow/probability#2034 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
tensorflow/probability#2021 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
tensorflow/probability#2015 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
tensorflow/probability#2013 ·
Tutte le issue di tensorflow/probability
Issue simili
-
[Bug]: DoubleMLRDDData accepts a score_col that is no data column (as in its docstring example); the running variable then becomes a covariate and RDFlex failsForse già presa @vrjdev l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
DoubleML/doubleml-for-py#455 ·
I maintainer di solito rispondono entro 1 giorno
-
Install page: spectarf's CUDA engine fails with PyTorch for CUDA 13.0 (nvvmError: ERROR_INVALID_IR)Forse già presa @lukepolson l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
PyTomography/PyTomography#435 ·
I maintainer di solito rispondono entro 1 giorno
-
beginner friendly
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
aws-samples/sample-per-model-bedrock#821 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
instadeepai/InstaNovo-FM#50 ·