TargetFunc

TargetFunc(self, neglogfx: Callable[[Tensor], Tensor], vectorised: bool = True)

The negative logarithm of a density function to be approximated.

Parameters

neglogfx : Callable[[Tensor], Tensor]

A function which returns the negative logarithm of a (possibly unnormalised version of) the target density function. If vectorised=True, the function should accept an \(n \times d\) matrix (where \(n\) denotes the number of samples and \(d\) denotes the dimension of the parameters), and return an \(n\)-dimensional vector containing the function evaluated at each sample. If vectorised=False, the function should accept a \(d\)-dimensional vector and return a single scalar value.

vectorised : bool = True

Whether the function accepts multiple sets of parameters.