Decompose
First-order decomposition utilities for the Orthogonal Additive Kernel.
Provides functions to rank features by their first-order importance and to compute posterior predictions for individual first-order components.
Reference
Lu, X., Boukouvalas, A., & Hensman, J. (2022). Additive Gaussian Processes Revisited. ICML.
rank_first_order
rank_first_order(
kernel: OrthogonalAdditiveKernel,
x_train: Float[Array, "N D"],
y_train: Float[Array, "N 1"],
noise_variance: float,
) -> Float[Array, " D"]
Unnormalised per-feature first-order importance scores.
For each dimension d, computes
:math:\sigma_1^2 \, \boldsymbol{\alpha}^\top M_d \boldsymbol{\alpha}
where :math:M_d is the per-dimension integral matrix and
:math:\sigma_1^2 is the first-order variance.
Parameters:
-
kernel(OrthogonalAdditiveKernel) βA fitted OrthogonalAdditiveKernel.
-
x_train(Float[Array, 'N D']) βTraining inputs of shape (N, D).
-
y_train(Float[Array, 'N 1']) βTraining targets of shape (N, 1).
-
noise_variance(float) βObservation noise variance.
Returns:
-
Float[Array, ' D']βArray of shape (D,) with unnormalised importance scores.
predict_first_order
predict_first_order(
kernel: OrthogonalAdditiveKernel,
x_train: Float[Array, "N D"],
y_train: Float[Array, "N 1"],
noise_variance: float,
dim: int,
x_grid: Float[Array, " M"],
) -> tuple[Float[Array, " M"], Float[Array, " M"]]
Posterior mean and variance for a single first-order component.
Evaluates the posterior of the first-order GP component for dimension
dim on the 1-D grid x_grid.
Parameters:
-
kernel(OrthogonalAdditiveKernel) βA fitted OrthogonalAdditiveKernel.
-
x_train(Float[Array, 'N D']) βTraining inputs of shape (N, D).
-
y_train(Float[Array, 'N 1']) βTraining targets of shape (N, 1).
-
noise_variance(float) βObservation noise variance.
-
dim(int) βFeature dimension index.
-
x_grid(Float[Array, ' M']) β1-D evaluation grid of shape (M,).
Returns:
-
Float[Array, ' M']βTuple of (mean, variance) each of shape (M,). Variance is
-
Float[Array, ' M']βclipped to non-negative values.