Skip to content

Add SkewGeneralizedNormal distribution (generalized normal v2)#2025

Open
inhandan wants to merge 1 commit into
tensorflow:mainfrom
inhandan:add-skew-generalized-normal
Open

Add SkewGeneralizedNormal distribution (generalized normal v2)#2025
inhandan wants to merge 1 commit into
tensorflow:mainfrom
inhandan:add-skew-generalized-normal

Conversation

@inhandan
Copy link
Copy Markdown

Adds the skew generalized normal distribution (the "version 2" / skew variant of the generalized normal), parameterized by location loc, scale scale (> 0) and shape peak (any nonzero real). It is the change-of-variables of a standard normal under
y = (-1/peak) * log(1 - peak * (x - loc) / scale), giving a parameter-dependent half-line support whose mode sits at or near the support boundary (the gap shrinks like exp(-peak**2) as |peak| grows).

Includes log_prob / cdf / log_cdf / survival / quantile / sampling, entropy, mean / variance / mode, and a support-respecting default event-space bijector built as a single Chain (valid for either sign of peak). Full unit tests validate against the closed-form v2 formulas and the peak -> 0 Normal limit, since no v2 reference exists in scipy (scipy.stats.gennorm is the symmetric v1). Registered in distributions __init__, BUILD, and hypothesis_testlib.

@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 25, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Adds the skew generalized normal distribution (the "version 2" / skew
variant of the generalized normal), parameterized by location `loc`,
scale `scale` (> 0) and shape `peak` (any nonzero real). It is the
change-of-variables of a standard normal under
y = (-1/peak) * log(1 - peak * (x - loc) / scale), giving a
parameter-dependent half-line support whose mode sits at or near the
support boundary (the gap shrinks like exp(-peak**2) as |peak| grows).

Includes log_prob / cdf / log_cdf / survival / quantile / sampling,
entropy, mean / variance / mode, and a support-respecting default
event-space bijector built as a single Chain (valid for either sign of
`peak`). Full unit tests validate against the closed-form v2 formulas and
the peak -> 0 Normal limit, since no v2 reference exists in scipy
(scipy.stats.gennorm is the symmetric v1). Registered in distributions
`__init__`, BUILD, and hypothesis_testlib.
@inhandan inhandan force-pushed the add-skew-generalized-normal branch from cec5d94 to c3ac6ca Compare May 26, 2026 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant