-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Make DimShuffle
d variables measurable
#150
Comments
Definitely useful 😉 |
This should be covered by
Also, I believe there's a clients-based restriction hard coded into |
MeasurableDimShuffle
DimShuffle
d variables measurable
You cannot lift a dimshuffle through the core dimension of a distribution parameters, at least not for all distributions. There is no way to lift And in the first example it would be valid but have a completely different meaning. You could however extend the lift if the Dimshuffle only affects non-core dimensions |
Yes, the current version of |
Now that I think about it, there may be a way to make it always possible to lift these operations. The reason we can't lift the |
Why not just DimShuffle the value variables and evaluate them at the original un-DimShuffled measurable variables? That will also work for measurable variables that are not pure RandomVariables in general. |
While that might work for the purpose of constructing a log-probability function—in the same way that For instance, The problems associated with lifting In other words,
Those When we make the multivariate extensions mentioned here, |
I don't see why this would be the case with our current eager IR. A dimshuffle of a measurable component would be converted into a MeasurableDimShuffle eventually (since such rewrite can always be applied), and then the MeasurableMixture should behave exactly as if the component was any other MeasurableVariable. This rewrite can always be applied later if it complicates other forms of pattern matching (which I don't think is yet the case).
I am not sure about the performance benefits of lifting a (non-reducing) operator over a function of multiple inputs. For instance for the DS case you usually would need to apply it to all inputs above the RV, instead of only applying it once to the output of the RV.
This makes a lot of sense. For instance, here I had to guess what the ndim_supp of a MeasurableVariable was by how many dims were lost, but it would have been much better to have that information in the IR op level: Line 124 in 394dc72
|
Yes, and then we're locked into the current eager approach. This is the kind of coupling between design decisions that constricts our possibilities going forward. At the same time,
Just like the example to which I linked, In other words, it's a type of If we can do things in a way that open us up to more features, approaches, and solves our immediate problem(s), then we need to consider such ways the most seriously. |
An example of what should be measurable is the following:
The transpose is one example of a
DimShuffle
under the hood, but there are three categories of operations that make use ofDimShuffle
s:To my understand, each of these will require to be handled separately, but probably in a similar fashion.
CC @ricardoV94 @brandonwillard
The text was updated successfully, but these errors were encountered: