Skip to content

Implement PositivePowerTransform#2904

Merged
neerajprad merged 3 commits into
devfrom
power-transform
Jul 20, 2021
Merged

Implement PositivePowerTransform#2904
neerajprad merged 3 commits into
devfrom
power-transform

Conversation

@fritzo
Copy link
Copy Markdown
Member

@fritzo fritzo commented Jul 20, 2021

This implements a PositivePowerTransform. Whereas PowerTransform allows arbitrary exponent and requires positive domain and codomain, this requires positive exponent and allows real domain and codomain.

The intended use case is in sparse regression problems where this can be combined with TransformReparam and AutoNormal / AutoLowRankMultivariateNormal guides, achieving a horseshoe-like prior while attempting to keep the transformed posterior unimodal:

scale = pyro.sample("scale", LogNormal(0, 1))
sparsity = pyro.sample("sparsity", LogNormal(0, 1))
with poutine.reparam(config={"x": TransformReparam()}):
    x = pyro.sample(
        "x",
        TransformedDistribution(
            Normal(0, scale),
            PositivePowerReparam(sparsity),
        ),
    )

Tested

  • added a transform test

Comment thread pyro/distributions/transforms/power.py Outdated
@neerajprad neerajprad merged commit 09e4401 into dev Jul 20, 2021
@fritzo fritzo deleted the power-transform branch September 27, 2021 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants