Skip to content

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.