-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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 request: Named RV dimensions #4565
Comments
I think this is closely tied to the discussion on #4552 which will provide useful context, especially on the difference between dimensions and coordinate labels. The example above is actually about using labeled indexing with coordinate labels. In positional/numpy-like indexing, the dimension is defined by the position within the From the example I understand we want to get the position labeled |
That's like a smart translation from coords = {
"treatment": ["juice", "ethanol", "caffeine"],
}
effect_size = pm.Normal("effect_size", dims=("treatment")) We could write effect = pm.Deterministic(effect_size["caffeine"]) Instead of effect = pm.Deterministic(effect_size[coords["treatment"].index("caffeine")]) I am not familiar with how we treat |
Related: pymc-devs/pytensor#352. |
Closing as this is being discussed in the context of PyTensor |
Can you link to the related issue in pytensor if there is one? |
@aseyboldt did you write down something already? |
Ekatarina just had a good idea: naming dimensions of random variables:
pm.Normal("mu", group_mu["control_group"], 1)
instead ofpm.Normal("mu", group_mu[0], 1)
.The text was updated successfully, but these errors were encountered: