Comments (5)
So I don't think this is an issue with the RadialFlow
:
d = MvNormal(zeros(2), I(2))
b = inverse(bijector(Dirichlet(ones(3))))
# RadialLayer
z_0 = zeros(length(d))
α = 0
β = 1
r = RadialLayer(α, β, z_0)
# Without simplex.
xs = eachcol(rand(transformed(d, r), 10000))
histogram2d(first.(xs), Base.Fix2(getindex, 2).(xs), nbins=50)
results in
So it's indeed symmetric.
The "issue" I guess is that the simplex bijector is not. The transformation is described here: https://mc-stan.org/docs/reference-manual/simplex-transform.html
It's not immediately obvious to me why this would be symmetric, though the resulting distribution indeed looks symmetric if you use a zero-mean isotropic Gaussian as the base.
I think @sethaxen might be the best guy to answer this:)
from bijectors.jl.
Cool, just don't use softmax
directly, as it's not bijective. You might want to try out "NormalizedExponential" or "AugmentedSoftmax" here: https://github.com/mjhajharia/transforms/tree/main/transforms/simplex . Both are bijective by augmenting softmax with logsumexp, but they do different things to the inputs to softmax to try to improve the geometry, and they use different priors for the discarded parameter (the output of logsumexp).
from bijectors.jl.
All stick-breaking transforms are indeed not symmetric. There are symmetric transforms on the simplex though (in particular, several softmax-based transforms, e.g. the additive log ratio transform from compositional data analysis), though some are better for MCMC than others. How important is this symmetry to you?
from bijectors.jl.
@sethaxen Quite crucial, my general goal is to have some kind of circular prior in the simplex, but all components should have equal chances. Since the bijection aspect is not so important to me, I could try using the softmax
approach.
from bijectors.jl.
Since it's not a bug but just a specificity of the model used I will close this issue
from bijectors.jl.
Related Issues (20)
- rational quadratic flows not supporting Float32 input HOT 1
- What to do with `CorrBijector` ? HOT 1
- Improve `PDVecBijector`
- Matrix factorization bijectors HOT 4
- Domain Error for VecCholeskyBijector bijector when calling logabsdetjac HOT 4
- Question on simplex bijector implementation HOT 9
- Can't apply Bijectors.ordered to TDist() and MvTDist() HOT 1
- Incorrect bijector for heterogeneous Product distribution HOT 3
- Stackoverflow in custom bijector HOT 2
- Missing implementation of `Bijectors.bijector` for `arraydist` distributions. HOT 1
- Bijectors.ordered and MvLogNormal interaction .. only supported for unconstrained distributions. HOT 1
- `TruncatedBijectors` not defined in `Distributions` extension
- support ProductDistribution HOT 3
- Fixes to correlation bijectors
- Improve `with_logabsdet_jacobian` performance for `SimplexBijector` HOT 1
- Tests are failing for `VecCorrBijector` in _very_ rare scenarios
- Add Tapir to Bijectors tests. HOT 2
- README links to dead docs HOT 2
- StackOverflow on calling inverse VecCorrBijector with a multidimensional array
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bijectors.jl.