Ayushman Gupta
Ayushman Gupta

Reputation: 94

What is Bijectors in layman terms in tensorflow probability

I am not able to understand Bijectors in Tensorflow-probability. how to use them.

standard_gumbel = tfd.TransformedDistribution(
distribution=tfd.Exponential(rate=1.),
bijector=tfb.Chain([
tfb.Affine(
scale_identity_multiplier=-1.,
event_ndims=0),
tfb.Invert(tfb.Exp()),
]))

Upvotes: 5

Views: 2791

Answers (1)

Chris Suter
Chris Suter

Reputation: 1383

Bijectors encapsulsate the change of variables for a probability density.

Roughly speaking, when you (smoothly and invertibly) map one space to another, you also induce a map from probability densities on the initial space to densities on the target space. In general such transformations warp lengths/areas/volumes (measures) in the initial space to different lengths/areas/volumes in the target space. Since densities incorporate volume information, we need to keep track of these warpings and account for them in the computation of the probability density in the latter space.

By implementing forward and inverse transformations, as well as log Jacobian determinants, Bijectors give us all the info we need to transform random samples as well as probability densities.

Upvotes: 10

Related Questions