-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Allow scale to compose with transformations #971
Conversation
@SteveBronder - This is the proof of concept of the alternative version. If you ignore the multiarch build problem ATM it compiles all the models fine, including the following: data {
int<lower=0> N;
}
parameters {
array[3] real<lower=0><offset=10> loweroffset;
real<lower=0, upper=1><offset=1, multiplier=10> allfour;
simplex<offset=1>[10] offset_simplex;
positive_ordered<multiplier=10>[N] multiplied_ordered;
} We can throw this into cmdstan and start doing some actual modeling tests next week |
The implementation here should be good to go, @bob-carpenter and I need to work on some example models and the doc for it. |
Is this waiting on review? |
There was a lot of discussion in #659 about whether this was the right thing to do or not, which is the bigger blocker I believe |
This has fallen too far behind, so I'm going to close it for now |
This is a much more limited alternate take on #947. Basically, separate out offset and multiplier from the idea of a transformation, and allow them to be composed, but not arbitrary other compositions. This aligns more directly with #659
Submission Checklist
Release notes
Offset/Multiplier scaling can now be applied to constrained data types, like
real<lower=0><offset=1>
. When constraining, the scaling is done first so that the result is truly of the constrained type.Copyright and Licensing
By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)