MetropolisHastings Random Walk related classes (tomographer)¶
The only MetropolisHastings Random Walk C++ class which we interface here is the structure which specifies the parameters of the random walk: step size, sweep size, number of thermalization sweeps and number of live sweeps.
If you want to customize the random walk procedure (e.g. define a new random walk scheme), currently you need to write that in C++. (But anyway that’s probably what you’d want to do, because C++ is way faster than Python for simple boring computing tasks.)

class
tomographer.
MHRWParams
¶ Bases:
pybind11_builtins.pybind11_object
Parameters for a MetropolisHastings random walk.

MHRWParams
(mhrw_params=, n_sweep, n_therm, n_run, **kwargs)¶ Construct a MHRWParams instance, initializing the readonly members mhwalker_params, n_sweep, n_therm and n_run to the values given to the constructor.
This class is
pickle
able.See also
See the corresponding C++ class Tomographer::MHRWParams for more information about these parameters. (The interfaced class uses the template parameters MHWalkerParams=py::object and CountIntType=int.)

mhwalker_params
¶

n_sweep
¶

n_therm
¶

n_run
¶


class
tomographer.
ValueHistogramWithBinningMHRWStatsCollectorResult
¶ Bases:
pybind11_builtins.pybind11_object
Interfaces the corresponding C++ class Tomographer::ValueHistogramWithBinningMHRWStatsCollectorResult.
This class is
pickle
able.
histogram
¶ The resulting histogram, with the final error bars. The scaling of the histogram is chosen such that each bin value represents the fraction of sample data points whose value were inside this bin. Note: This histogram is NOT normalized to a probability density.
Changed in version 5.0: Renamed hist to histogram.

error_levels
¶ Detailed error bars for all binning levels. This is a matrix with a number of rows equal to the number of bins and a number of columns equal to the number of binning levels. Each entry corresponds to the error bar calculated after the given binning level, where the last (rightmost) entry corresponds to the final, hopefully converged error bar.

converged_status
¶ The convergence status determined for each error bar. This is a vector of length equal to the number of histogram bins. Each element of the vector indicates that the corresponding histogram error bar has converged (
BinningAnalysis.CONVERGED
), has not converged (BinningAnalysis.NOT_CONVERGED
), or whether the convergence status is unknown or couldn’t be determined (BinningAnalysis.UNKNOWN_CONVERGENCE
).
