stein_thinning.kernel.vfk0_imq

Contents

stein_thinning.kernel.vfk0_imq#

stein_thinning.kernel.vfk0_imq(x: ndarray, y: ndarray, sx: ndarray, sy: ndarray, linv: ndarray, c: float = 1.0, beta: float = -0.5) ndarray#

Evaluate Stein kernel based on inverse multiquadratic kernel

The Stein kernel is evaluated for pairs of points and requires the values of gradients at the same points to be supplied.

Parameters#

x: np.ndarray

n x d array where each row is a d-dimensional sample point for the first argument of the kernel. Alternatively, 1 x d array that will be broadcast with y.

y: np.ndarray

n x d array where each row is a d-dimensional sample point for the second argument of the kernel. Alternatively, 1 x d array that will be broadcast with x.

sx: np.ndarray

n x d array where each row is a d-dimensional gradient calculated at the corresponding point in x. Alternatively, 1 x d array that will be broadcast with sy.

sy: np.ndarray

n x d array where each row is a d-dimensional gradient calculated at the corresponding point in y. Alternatively, 1 x d array that will be broadcast with sx.

linv: np.ndarray

d x d preconditioner matrix.

c: float

parameter of the inverse multiquadratic kernel. Default: 1.0.

beta: float

exponent of the inverse multiquadratic kernel. Default: -0.5.

Returns#

np.ndarray

array of length n with values of the kernel evaluated for each pair of points