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

Add overload for lub_constrain/lub_free for single tuple of bounds #3083

Closed
andrjohns opened this issue Jun 16, 2024 · 3 comments · Fixed by #3087
Closed

Add overload for lub_constrain/lub_free for single tuple of bounds #3083

andrjohns opened this issue Jun 16, 2024 · 3 comments · Fixed by #3087

Comments

@andrjohns
Copy link
Collaborator

Description

Requiring separate arguments when specifying upper and lower bounds can lead to redundant computation. By taking a single tuple containing the upper/lower bounds, models can reuse quantities as much as possible

Example

This would be great for copula with discrete marginals, where the linear predictor term is used to specify bounds

Current Version:

v4.9.0

@andrjohns
Copy link
Collaborator Author

This would also require a new keyword for the constraint though, @WardBrian what do you think?

@WardBrian
Copy link
Member

I’d want to see an example, but if my first guess is correct it seems reasonable to have a lower_upper=(,) keyword

@andrjohns
Copy link
Collaborator Author

I’d want to see an example, but if my first guess is correct it seems reasonable to have a lower_upper=(,) keyword

Brill! An alternative would also be to allow using transformed parameters in parameter bounds, but I have no idea how complex that might be on the backend

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

Successfully merging a pull request may close this issue.

2 participants