Skip to contents

Select inducing points deterministically

Usage

select_inducing_points(
  x,
  n_inducing,
  method = c("farthest", "quantile", "variance"),
  kernel = NULL
)

Arguments

x

Numeric vector or matrix of candidate inputs.

n_inducing

Number of inducing points to select.

method

Selection method. "farthest" performs deterministic farthest-point sampling after column standardization. "quantile" selects points near equally spaced empirical quantiles and is available only for one-dimensional inputs. "variance" performs greedy conditional-variance selection under kernel.

kernel

Kernel specification, needed by method = "variance".

Value

A numeric matrix with one inducing point per row. The selected training-row indices are stored in the indices attribute.

Details

Repeated input rows are offered as candidates only once, so the selected inducing locations are always distinct. n_inducing therefore cannot exceed the number of distinct rows in x.

Greedy conditional-variance selection (Burt, Rasmussen, and van der Wilk, 2019, 2020) adds, one at a time, the input whose prior variance is least explained by the points chosen so far: the largest residual \(k(x, x) - Q(x, x)\) with \(Q\) the Nyström approximation from the chosen points. This is the pivot order of a pivoted Cholesky decomposition of \(K(X, X)\), computed incrementally without forming \(K(X, X)\) in \(O(n m^2)\) time and \(O(n m)\) memory. It minimizes the trace term \(\mathrm{tr}(K_{ff} - Q_{ff})\) greedily, so it is the natural choice for VFE, whose bound loses half that trace over the noise variance. If the prior variance is explained, to a relative \(10^{-12}\), before n_inducing points are chosen, the selection stops with a warning of class gaussianprocesses_inducing_warning and returns fewer points.

Stability

Experimental: this interface may change in a minor release, and every change is listed in NEWS. See gaussianprocesses-package for the policy.

References

Burt, D. R., Rasmussen, C. E., and van der Wilk, M. (2019). Rates of convergence for sparse variational Gaussian process regression. Proceedings of the 36th International Conference on Machine Learning, 862–871.

Burt, D. R., Rasmussen, C. E., and van der Wilk, M. (2020). Convergence of sparse variational inference in Gaussian processes regression. Journal of Machine Learning Research, 21(131), 1–63.

Examples

x <- seq(0, 10, length.out = 101)

inducing <- select_inducing_points(x, n_inducing = 5, method = "quantile")
inducing[, 1]
#> [1]  0.0  2.5  5.0  7.5 10.0
attr(inducing, "indices")
#> [1]   1  26  51  76 101