MCMCCalculator is a concrete implementation of IntervalCalculator. It creates a Markov Chain of data points using Monte Carlo, implementing the Metropolis algorithm. From this Markov Chain, this class can generate a MCMCInterval as per user specification.
Note: Currently the Markov Chain is created within this class, but this feature will be factored out in future implementations so that Markov Chains can be generated for other purposes.
In the main algorithm, new points in the space of parameters are proposed and then visited based on their relative likelihoods. This class can accept any implementation of the ProposalFunction interface, including non-symmetric proposal functions, and still maintain detailed balance.
The interface allows one to pass the model, data, and parameters via a workspace and then specify them with names.
After configuring the calculator, one only needs to ask GetInterval(), which will return an ConfInterval (MCMCInterval in this case) pointer.
RooArgList* | fAxes | which variables to put on each axis |
const char* | fDataName | name of data set in workspace |
RooArgSet* | fNuisParams | nuisance parameters for interval |
Int_t | fNumBins | set the number of bins to create for each |
Int_t | fNumBurnInSteps | number of iterations to discard as burn-in, starting from the first |
Int_t | fNumIters | number of iterations to run metropolis algorithm |
Bool_t | fOwnsWorkspace | whether we own the workspace |
RooArgSet* | fPOI | parameters of interest for interval |
const char* | fPdfName | name of common PDF in workspace |
RooStats::ProposalFunction* | fPropFunc | Proposal function for MCMC integration |
Double_t | fSize | size of the test (eg. specified rate of Type I error) |
RooWorkspace* | fWS | owns all the components used by the calculator |
alternate constructor
set a workspace that owns all the necessary components for the analysis
specify the parameters of interest in the interval
{fPOI = &set;}
set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval)
{fNuisParams = &set;}
set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval)
{fSize = size;}
set the proposal function for suggesting new points for the MCMC
{fSize = 1.-cl;}
set the number of iterations to run the metropolis algorithm
{ fPropFunc = &proposalFunction; }
set the number of steps in the chain to discard as burn-in, starting from the first
{ fNumIters = numIters; }
set the number of bins to create for each axis when constructing the interval
{ fNumBurnInSteps = numBurnInSteps; }