You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cuqi/experimental/mcmc/_gibbs.py
+28-2Lines changed: 28 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,10 @@ class HybridGibbs:
42
42
fully stateful at this point. This means samplers like NUTS will lose
43
43
their internal state between Gibbs steps.
44
44
45
+
The order in which the conditionals are sampled is the order of the
46
+
variables in the sampling strategy, unless a different sampling order
47
+
is specified by the parameter `scan_order`
48
+
45
49
Parameters
46
50
----------
47
51
target : cuqi.distribution.JointDistribution
@@ -58,6 +62,11 @@ class HybridGibbs:
58
62
will call its step method in each Gibbs step.
59
63
Default is 1 for all variables.
60
64
65
+
scan_order : list or str, *optional*
66
+
Order in which the conditional distributions are sampled.
67
+
If set to "random", use a random ordering at each step.
68
+
If not specified, it will be the order in the sampling_strategy.
69
+
61
70
callback : callable, optional
62
71
A function that will be called after each sampling step. It can be useful for monitoring the sampler during sampling.
63
72
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)`.
0 commit comments