Closed neildhir closed 9 months ago
I don't know if there is a way to 'turn-off' dimensions in the `LebesgueMeasure' so that integration only takes place over the relevant dimension but whilst also maintaining the correct dimensionality of the problem (i.e. the kernel maintains an input shape of 2)?
Currently, there is no way to marginalize a GP with the Probnum BQ code directly (i.e., building a multidimensional GP and computing the integral only over a subset of dimensions). If your $c$ value is indeed fixed, you may want to explore analytic ways to rephrase your problem as a 1D problem and see where it leads you. But I am afraid I cannot help you all too much with this bit.
Understood, thank you!
This question is more about my lack of knowledge/implementation-knowledge rather than a software issue.
The problem is as follows. I would like to estimate the expectation of a variable $Y$ in a Bayesian network when another variable in that network is fixed to a specific value, a constant so that $W=c$.
We can express the expectation like so
$$ \mathbb{E} [Y \mid W = c] = \int\int_R f(B,W)dBdW = \int_B p(Y \mid W=c,B)p(B)dB$$
where $R$ is the region of integration. Now intuitively I would just substitute $W$ for $c$ in my closed-form expression but when using BQ I am not quite sure how to proceed. As ever I would like to use my data-samples to estimate this double-integral and
bayesquad_from_data
.Using some previous code to essentially use all the bits that are under the hood of
bayesquad_from_data
an example would then look like this with data (from my simulator) $\mathcal{D} = (\mathbf{x}_i, y_i)_i$where $c=-3.175$.
Setting up a BQ problem with this data.
Now I am pretty sure this is wrong for two reasons:
kernel = ExpQuad(input_shape=(1,))
butI don't know if there is a way to 'turn-off' dimensions in the `LebesgueMeasure' so that integration only takes place over the relevant dimension $B$ but whilst also maintaining the correct dimensionality of the problem (i.e. the kernel maintains an input shape of 2)? Or if the domains could be written in a clever way so that integration properly takes place w.r.t. the constant dimension?