TransformVariables.jl
                                
                                 TransformVariables.jl copied to clipboard
                                
                                    TransformVariables.jl copied to clipboard
                            
                            
                            
                        Transformations to contrained variables from ℝⁿ.
As an additional feature it would be nice if we could use a `transform` to check if the provided inputs are legal. For example ```Julia in_domain(t, y) ``` would return...
For scalar transforms `inverse` is checking the input but not special arrays: ```Julia ## scalar transform inverse(as(Real, 5, 10), 5.5) inverse(as(Real, 5, 10), 1.5) # -> error, good inverse(as(Real, 5,...
Use separate building blocks for 1. splitting a vector into arrays (or other objects) of various sizes and dimensions, *without transforming*, 2. transformations. Transformations should 1. have a `dimension`, 2....
I'd like to use TransformVariables as part of an HMC sampler, but my evaluating my target distribution's probability density involves solving a partial differential equation, which is done outside Julia...
E.g. ```julia julia> t = as((σ = asℝ₊,)); julia> transform(t, [-746]) (σ = 0.0,) ``` This is causing problems in some optimization code where we optimize over the `Vector` representation...
```julia import Zygote using TransformVariables f(y) = y.mu + y.sigma t = as((mu = as(Real, -25, 25), sigma = asℝ₊), ) Zygote.gradient(f ∘ t, zeros(2)) (f∘t)(zeros(2)) ``` (this is the...
I noticed this bit of code: ```julia logistic(x::Real) = inv(one(x) + exp(-x)) function logistic_logjac(x::Real) mx = -abs(x) mx - 2*log1p(exp(mx)) end ``` There's a neat trick that can speed this...
- [ ] identity array transformations, especially with generalized indexing (should just copy, check that it is aligned correctly) - [ ] use the checkbounds framework for index checking with...
https://github.com/tpapp/LogDensityProblems.jl/issues/33 This package should depend on LogDensityProblems, not the other way round. This would remove TransformVariables from the indirect dependency chain of DynamicHMC.
Fixes #6.