-
-
Notifications
You must be signed in to change notification settings - Fork 24
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 a repair_variable_names
function
#317
Comments
If the other posterior authors are ok with adding this I can make a PR. |
yes that would be nice!
Jonah Gabry ***@***.***> schrieb am Fr., 17. Nov. 2023, 17:54:
… If the other posterior authors are ok with adding this I can make a PR.
—
Reply to this email directly, view it on GitHub
<#317 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADCW2AGEQFTYLS5X4WBOYYLYE6JCTAVCNFSM6AAAAAA7P7MTDCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJWG43DONRZHA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@paul-buerkner Any preference where this should go? I was thinking of documenting it on the same doc page as x <- set_variables(x, repair_variable_names(bad_names)) which seems like the most common use case for a function like |
yeah I like that!
Jonah Gabry ***@***.***> schrieb am Fr., 17. Nov. 2023, 18:30:
… @paul-buerkner <https://github.com/paul-buerkner> Any preference where
this should go? I was thinking of documenting it on the same doc page as
set_variables(), but I could also put it somewhere else. On slack
@avehtari <https://github.com/avehtari> gave an example of
x <- set_variables(x, repair_variable_names(bad_names))
which seems like the most common use case for a function like
repair_variable_names.
—
Reply to this email directly, view it on GitHub
<#317 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADCW2ADQ6NLYK6J7LH75RZTYE6NK3AVCNFSM6AAAAAA7P7MTDCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJWHAYTSNBYGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Started to think, whether |
Can you add examples of how the names for these would look like? It would be good to recognize complex and tuples even if there would not be support at the moment |
I opened a PR for this (#318) using |
Complex variables use Tuples use If you want some really nasty edge cases, you can see some of the test cases of my stanio Python package |
This allows you to translate from the names Stan uses (like
theta.1
) to those Posterior wants (theta[1]
).This function exists (privately) in cmdstanr, and is currently very simple:
This doesn't work for complex numbers or tuples, but since posterior doesn't seem to support those either I think this is fine
The text was updated successfully, but these errors were encountered: