- pymc.iter_sample(draws, step, start, trace=None, chain=0, tune=0, model=None, random_seed=None, callback=None)#
Generate a trace on each iteration using the given step method.
Multiple step methods ared supported via compound step methods. Returns the amount of time taken.
The number of samples to draw
Starting point in parameter space (or partial point).
This should be a backend instance, or a list of variables to track. If None or a list of variables, the NDArray backend is used.
Chain number used to store sample in backend.
Number of iterations to tune (defaults to 0).
A function which gets called for every sample from the trace of a chain. The function is called with the trace and the current draw and will contain all samples for a single trace. the
draw.chainargument can be used to determine which of the active chains the sample is drawn from. Sampling can be interrupted by throwing a
KeyboardInterruptin the callback.
Contains all samples up to the current iteration
for trace in iter_sample(500, step): ...