latest (dev)
Copy
Latest development documentation · Updated 2026-10-08
StickBreakingTransform
- class tensorplay.distributions.StickBreakingTransform(cache_size: int = 0)[source]
Transform from unconstrained space to the simplex of one additional dimension via a stick-breaking process.
This transform arises as an iterated sigmoid transform in a stick-breaking construction of the Dirichlet distribution: the first logit is transformed via sigmoid to the first probability and the probability of everything else, and then the process recurses.
This is bijective and appropriate for use in HMC; however it mixes coordinates together and is less appropriate for optimization.
- property inv: Transform
Returns the inverse
Transformof this transform. This should satisfyt.inv.inv is t.
- property sign: int
Returns the sign of the determinant of the Jacobian, if applicable. In general this only makes sense for bijective transforms.
Help improve this page
Found an error, an unclear step, or a missing example?

