WishartTriL does not support df \in (k - 1, k)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- machine-learning
Hướng nghiên cứu
Bắt đầu với cách tạo tfd.WishartTriL được thể hiện trong issue và kiểm tra cách nó xác thực df so với kích thước của scale_tril. So sánh hành vi và logpdf của nó với ví dụ Gamma được cung cấp cho k - 1 < df < k. Được xem là hoàn tất khi việc tạo đối tượng hợp lệ và hành vi của logpdf chính xác trong khoảng đó, đồng thời ràng buộc được ghi trong tài liệu đã được cập nhật tương ứng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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!
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 4.4k
- Fork
- 1.1k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của tensorflow/probability
-
KL divergence between two `TransformedDistribution`s with a shared non-injective bijector (`AbsoluteValue`) returns the base KLCó thể đã có người làm @Andreas-Hum đã nhận 7 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
tensorflow/probability#2036 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
tensorflow/probability#2034 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
tensorflow/probability#2021 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
tensorflow/probability#2015 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
tensorflow/probability#2013 ·
Tất cả issue của tensorflow/probability
Issue tương tự
-
[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 failsCó thể đã có người làm @vrjdev đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
DoubleML/doubleml-for-py#455 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Install page: spectarf's CUDA engine fails with PyTorch for CUDA 13.0 (nvvmError: ERROR_INVALID_IR)Có thể đã có người làm @lukepolson đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
PyTomography/PyTomography#435 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
beginner friendly
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
aws-samples/sample-per-model-bedrock#821 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
instadeepai/InstaNovo-FM#50 ·