stein_thinning.stein.kmat

Contents

stein_thinning.stein.kmat#

stein_thinning.stein.kmat(integrand: Callable[[Any, Any], ndarray], n: int) ndarray#

Compute a Stein kernel matrix

The matrix is obtained by evaluating the provided Stein kernel on a Cartesian square of sample.

Parameters#

integrand: Callable[[IndexerT, IndexerT], np.ndarray]

vectorised function returning the values of the integrand in the KSD integral for the given indices (rows and columns).

n: int

size of the matrix to return

Returns#

np.ndarray

n x n array containing the Stein kernel matrix.