TransformVariables.jl
TransformVariables.jl copied to clipboard
Feature Idea: scaling factor for ShiftedExp
It would be useful, if we can optionally define a scale to ShiftedExp. For example, if we have two parameter a and b that are both positive, but have very different scales, we could write:
t = as((a = as(Real, 0, ∞, scale=1),
b = as(Real, 0, ∞, scale=1000)))
which would map to shift + exp(x/scale).
Having similar scales helps with optimization and sampling.
(Sorry for opening so many issues today. Your package has been very useful for me!)
Good idea, will do it when I have some time.
Thanks for the issue and the PR. Ideally I would like to deal with this in a modular way, eg encoding this transformation as
Shift(x) ∘ Exp() ∘ Scale(y) # hypothetical, currently nonexistent API
I will be refactoring this package soon --- do you need this feature now, or can it wait? (I am happy to add it now, just let me know).
Such a modular approach sounds great! It's not particularly urgent for me. I'm looking forward to the refactored version!