Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Idea: scaling factor for ShiftedExp #95

Open
scheidan opened this issue Aug 3, 2022 · 3 comments
Open

Feature Idea: scaling factor for ShiftedExp #95

scheidan opened this issue Aug 3, 2022 · 3 comments

Comments

@scheidan
Copy link
Contributor

scheidan commented Aug 3, 2022

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!)

@tpapp
Copy link
Owner

tpapp commented Aug 4, 2022

Good idea, will do it when I have some time.

@tpapp
Copy link
Owner

tpapp commented Aug 6, 2022

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).

@scheidan
Copy link
Contributor Author

scheidan commented Aug 8, 2022

Such a modular approach sounds great!
It's not particularly urgent for me. I'm looking forward to the refactored version!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants