Changing a parameter that isn't on the chain every sample

Not that I know of. But note that 1 chain is just 1 sampling of the model, so you could just perturb A and B between calls to pm.sample something like


for j in range(nchains):
    A += np.random.(...)   # I *think* += operates on the underlying memory rather than creating a new object
    B += np.random.(...)
    x_chains.append(pm.sample(..., chains=1))

1 Like