stein_thinning.stein.ksd#
- stein_thinning.stein.ksd(integrand: Callable[[Any, Any], ndarray], n: int) ndarray #
Compute a cumulative sequence of KSD values.
KSD values are calculated from sums of elements in each i x i square in the top-left corner of the kernel Stein matrix.
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
number of terms to calculate
Returns#
- np.ndarray
array shaped (n,) containing the sequence of KSD values.