cuqi.experimental.mcmc.Direct.__init__#
- Direct.__init__(target=None, initial_point=None, callback=None)#
Initializer for abstract base class for all samplers.
Any subclassing samplers should simply store input parameters as part of the __init__ method.
The actual initialization of the sampler should be done in the _initialize method.
- Parameters:
target (cuqi.density.Density) – The target density.
initial_point (array-like, optional) – The initial point for the sampler. If not given, the sampler will choose an initial point.
callback (callable, optional) – A function that will be called after each sampling step. It can be useful for monitoring the sampler during sampling. The function should take three arguments: the sampler object, the index of the current sampling step, the total number of requested samples. The last two arguments are integers. An example of the callback function signature is: callback(sampler, sample_index, num_of_samples).