-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Expose additional normal_id_glm
pointwise signatures
#1354
Comments
Is this just for convenience or do we expect different performance? I thought to_matrix was essentially free for eigen types |
Mostly convenience, since the majority of use-cases with a univariate outcome would be a single set of predictors (e.g., pointwise log-likelihood), so a |
I would be happy to help in this, if any reference PR or code exists please share. |
Hi @Pranavchiku -- It appears that the C++ math library already supports this, so the change in the compiler would be relatively tiny. The existing code in the compiler is here: stanc3/src/middle/Stan_math_signatures.ml Line 273 in 96e409a
We want to change stanc3/src/middle/Stan_math_signatures.ml Lines 13 to 31 in 96e409a
It looks like none of these are exactly what we want, so we'd create a new enum variant. I'd suggest the name stanc3/src/middle/Stan_math_signatures.ml Line 53 in 96e409a
such that DEigenTypes gets expanded to [UMatrix; UVector; URowVector]
Finally, to test that this all compiles, we'd then add calls to all the new overloads (including existing permutations) to this file: |
The current
normal_id_glm
signatures for use with a univariate outcomey
only supportmatrix
type inputs forx
, for example:For pointwise usage, it would be great to add corresponding
row_vector
signatures:As the current signatures require calling
to_matrix()
at each iteration:The text was updated successfully, but these errors were encountered: