jax version of GeneralizedExtremeValue distribution has wrong support for concentration=0
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 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 tfd.GeneralizedExtremeValue trong tensorflow_probability.substrates.jax.distributions và chạy bản tái hiện JAX được cung cấp cho các giá trị concentration xung quanh 0. So sánh hành vi support và log_prob được báo cáo tại concentration=0 với support không bị chặn được mong đợi; issue được hoàn tất khi JAX substrate xử lý trường hợp đó nhất quán với kỳ vọng đã nêu và hành vi liên quan được bao phủ bởi một regression test.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
It seems like the support of the GEV is (-1.0, inf) for concentration=0, rather than the expected (-inf, inf). I am using:
tensorflow-probability 0.24.0jax 0.4.30
I only tested this for the tensorflow_probability.substrates.jax.distributions version.
Otherwise, the support seems to be fine. Here's a little experiment for reproducing my findings:
import tensorflow_probability.substrates.jax.distributions as tfd
import jax.numpy as jnp
import pandas as pd
from itertools import product
def nominal_gev_support(loc, scale, concentration):
if jnp.allclose(concentration, 0.0):
return (-jnp.inf, jnp.inf)
if concentration > 0.0:
return (loc - scale / concentration, jnp.inf)
if concentration < 0.0:
return (-jnp.inf, loc - scale / concentration)
x = jnp.linspace(-5, 5, 1000)
cases = []
locs = [0.0]
scales = [1.0]
concentrations = list(jnp.linspace(-2, 2, 9))
for loc, scale, concentration in product(locs, scales, concentrations):
cases.append({"loc": loc, "scale": scale, "concentration": concentration})
dfs = []
for case in cases:
gev = tfd.GeneralizedExtremeValue(
loc=case["loc"], scale=case["scale"], concentration=case["concentration"]
)
lp = gev.log_prob(x)
not_nan_indices = jnp.argwhere(~jnp.isinf(lp))
nominal_min, nominal_max = nominal_gev_support(
loc=case["loc"], scale=case["scale"], concentration=case["concentration"]
)
data = {
"nominal_min": nominal_min,
"nominal_max": nominal_max,
"observed_min": x[not_nan_indices].min(),
"observed_max": x[not_nan_indices].max()
}
data |= case
df = pd.DataFrame(data, index=[0])
dfs.append(df)
results = pd.concat(dfs)
results
- 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 8 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ự
-
training
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
tinaudio/synth-setter#3758 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bot-triaged module: correctness (silent) module: data module: error checking triage review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 71/100
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 62/100
vllm-project/vllm-ascend#21392 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày