ROOT logo
ROOT » ROOFIT » ROOSTATS » RooStats::MCMCCalculator

class RooStats::MCMCCalculator: public RooStats::IntervalCalculator


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.



Function Members (Methods)

public:
virtual~MCMCCalculator()
static TClass*Class()
static TClass*RooStats::IntervalCalculator::Class()
virtual Double_tConfidenceLevel() const
virtual Double_tRooStats::IntervalCalculator::ConfidenceLevel() const
virtual RooStats::MCMCInterval*GetInterval() const
virtual RooStats::ConfInterval*RooStats::IntervalCalculator::GetInterval() const
virtual TClass*IsA() const
virtual TClass*RooStats::IntervalCalculator::IsA() const
RooStats::MCMCCalculatorMCMCCalculator()
RooStats::MCMCCalculatorMCMCCalculator(const RooStats::MCMCCalculator&)
RooStats::MCMCCalculatorMCMCCalculator(RooAbsData& data, RooAbsPdf& pdf, RooArgSet& paramsOfInterest, RooStats::ProposalFunction& proposalFunction, Int_t numIters, RooArgList* axes = NULL, Double_t size = 0.05)
RooStats::MCMCCalculatorMCMCCalculator(RooWorkspace& ws, RooAbsData& data, RooAbsPdf& pdf, RooArgSet& paramsOfInterest, RooStats::ProposalFunction& proposalFunction, Int_t numIters, RooArgList* axes = NULL, Double_t size = 0.05)
RooStats::IntervalCalculator&RooStats::IntervalCalculator::operator=(const RooStats::IntervalCalculator&)
virtual voidSetAxes(RooArgList& axes)
virtual voidSetConfidenceLevel(Double_t cl)
virtual voidRooStats::IntervalCalculator::SetConfidenceLevel(Double_t cl)
virtual voidSetData(const char* data)
virtual voidSetData(RooAbsData& data)
virtual voidRooStats::IntervalCalculator::SetData(RooAbsData&)
virtual voidRooStats::IntervalCalculator::SetData(const char* name)
virtual voidSetNuisanceParameters(RooArgSet& set)
virtual voidRooStats::IntervalCalculator::SetNuisanceParameters(RooArgSet&)
virtual voidSetNumBins(Int_t numBins)
virtual voidSetNumBurnInSteps(Int_t numBurnInSteps)
virtual voidSetNumIters(Int_t numIters)
virtual voidSetParameters(RooArgSet& set)
virtual voidRooStats::IntervalCalculator::SetParameters(RooArgSet&)
virtual voidSetPdf(const char* name)
virtual voidSetPdf(RooAbsPdf& pdf)
virtual voidRooStats::IntervalCalculator::SetPdf(RooAbsPdf&)
virtual voidRooStats::IntervalCalculator::SetPdf(const char* name)
virtual voidSetProposalFunction(RooStats::ProposalFunction& proposalFunction)
virtual voidSetTestSize(Double_t size)
virtual voidSetWorkspace(RooWorkspace& ws)
virtual voidRooStats::IntervalCalculator::SetWorkspace(RooWorkspace& ws)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidRooStats::IntervalCalculator::ShowMembers(TMemberInspector& insp, char* parent)
virtual Double_tSize() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
voidRooStats::IntervalCalculator::StreamerNVirtual(TBuffer& b)

Data Members

protected:
RooArgList*fAxeswhich variables to put on each axis
const char*fDataNamename of data set in workspace
RooArgSet*fNuisParamsnuisance parameters for interval
Int_tfNumBinsset the number of bins to create for each
Int_tfNumBurnInStepsnumber of iterations to discard as burn-in, starting from the first
Int_tfNumItersnumber of iterations to run metropolis algorithm
Bool_tfOwnsWorkspacewhether we own the workspace
RooArgSet*fPOIparameters of interest for interval
const char*fPdfNamename of common PDF in workspace
RooStats::ProposalFunction*fPropFuncProposal function for MCMC integration
Double_tfSizesize of the test (eg. specified rate of Type I error)
RooWorkspace*fWSowns all the components used by the calculator

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

MCMCCalculator()
 default constructor
MCMCCalculator(RooWorkspace& ws, RooAbsData& data, RooAbsPdf& pdf, RooArgSet& paramsOfInterest, RooStats::ProposalFunction& proposalFunction, Int_t numIters, RooArgList* axes = NULL, Double_t size = 0.05)
MCMCCalculator(RooAbsData& data, RooAbsPdf& pdf, RooArgSet& paramsOfInterest, RooStats::ProposalFunction& proposalFunction, Int_t numIters, RooArgList* axes = NULL, Double_t size = 0.05)
 alternate constructor
MCMCInterval* GetInterval() const
 Main interface to get a RooStats::ConfInterval.
MCMCCalculator()
 default constructor
virtual ~MCMCCalculator()
Double_t Size() const
 Get the size of the test (eg. rate of Type I error)
{return fSize;}
Double_t ConfidenceLevel() const
{return 1.-fSize;}
void SetWorkspace(RooWorkspace& ws)
 set a workspace that owns all the necessary components for the analysis
void SetData(const char* data)
 set the name of the data set
{ fDataName = data; }
void SetData(RooAbsData& data)
 Set the DataSet, add to the the workspace if not already there
void SetPdf(const char* name)
 set the name of the pdf
{ fPdfName = name; }
void SetPdf(RooAbsPdf& pdf)
 Set the Pdf, add to the the workspace if not already there
void SetParameters(RooArgSet& set)
 specify the parameters of interest in the interval
{fPOI = &set;}
void SetNuisanceParameters(RooArgSet& set)
 set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval)
{fNuisParams = &set;}
void SetTestSize(Double_t size)
 set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval)
{fSize = size;}
void SetConfidenceLevel(Double_t cl)
 set the proposal function for suggesting new points for the MCMC
{fSize = 1.-cl;}
void SetProposalFunction(RooStats::ProposalFunction& proposalFunction)
 set the number of iterations to run the metropolis algorithm
{ fPropFunc = &proposalFunction; }
void SetNumIters(Int_t numIters)
 set the number of steps in the chain to discard as burn-in,
 starting from the first
{ fNumIters = numIters; }
void SetNumBurnInSteps(Int_t numBurnInSteps)
 set the number of bins to create for each axis when constructing the interval
{ fNumBurnInSteps = numBurnInSteps; }
void SetNumBins(Int_t numBins)
 set which variables to put on each axis
{ fNumBins = numBins; }
void SetAxes(RooArgList& axes)
{ fAxes = &axes; }