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

Have rekey update the keys of the distribution parameters to match the KeyedDistribution #17

Open
bencottier opened this issue May 14, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@bencottier
Copy link
Contributor

Noted in #15:

If the parent distribution is constructed with a KeyedArray but the KeyedDistribution is given a new set of keys there is no expectation that these should match, e.g.

ka = KeyedArray(ones(3); id=[:a, :b, :c])

kd = KeyedDistribution(MvNormal(ka), [:x, :y, :z])

I don't think this explicitly goes against documentation, so not a bug. Maybe against the principles of the package - AxisKeys and AxisSets don't allow inconsistent keys, but there isn't a direct analogy to this, where some inner type (array) and the outer type should have the same keys but they are able to differ.

In any case, it would be useful to check. We could just add the option for rekey to update the "inner" keys to match the "outer" keys.

@bencottier bencottier added the enhancement New feature or request label May 14, 2021
@bencottier bencottier changed the title Check that keys of the distribution parameters match the KeyedDistribution Have rekey update the keys of the distribution parameters to match the KeyedDistribution May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant