MCMCInterval is a concrete implementation of the RooStats::ConfInterval interface. It takes as input Markov Chain of data points in the parameter space generated by Monte Carlo using the Metropolis algorithm. From the Markov Chain, the confidence interval can be determined in two ways:
Using a Kernel-Estimated PDF: (not the default method)
A RooNDKeysPdf is constructed from the data set using adaptive kernel width. With this RooNDKeysPdf F, we then integrate over the most likely domain in the parameter space (tallest points in the posterior RooNDKeysPdf) until the target confidence level is reached within an acceptable neighborhood as defined by SetEpsilon(). More specifically: we calculate the following for different cutoff values C until we reach the target confidence level: \int_{ F >= C } F d{normset}. Important note: this is not the default method because of a bug in constructing the RooNDKeysPdf from a weighted data set. Configure to use this method by calling SetUseKeys(true), and the data set will be interpreted without weights.
Using a binned data set: (the default method)
This is the binned analog of the continuous integrative method that uses the kernel-estimated PDF. The points in the Markov Chain are put into a binned data set and the interval is then calculated by adding the heights of the bins in decreasing order until the desired level of confidence has been reached. Note that this means the actual confidence level is >= the confidence level prescribed by the client (unless the user calls SetHistStrict(kFALSE)). This method is the default but may not remain as such in future releases, so you may wish to explicitly configure to use this method by calling SetUseKeys(false)These are not the only ways for the confidence interval to be determined, and other possibilities are being considered being added, especially for the 1-dimensional case.
One can ask an MCMCInterval for the lower and upper limits on a specific parameter of interest in the interval. Note that this works better for some distributions (ones with exactly one local maximum) than others, and sometimes has little value.
virtual | ~MCMCInterval() |
void | TObject::AbstractMethod(const char* method) const |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
virtual Bool_t | CheckParameters(const RooArgSet& point) const |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TNamed::Clear(Option_t* option = "") |
virtual TObject* | TNamed::Clone(const char* newname = "") const |
virtual Int_t | TNamed::Compare(const TObject* obj) const |
virtual Double_t | ConfidenceLevel() const |
virtual void | TNamed::Copy(TObject& named) const |
virtual void | TObject::Delete(Option_t* option = "")MENU |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() constMENU |
virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
virtual void | TObject::Dump() constMENU |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual void | TNamed::FillBuffer(char*& buffer) |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
virtual Double_t | GetActualConfidenceLevel() |
virtual RooArgList* | GetAxes() |
virtual const RooStats::MarkovChain* | GetChain() |
virtual const RooDataSet* | GetChainAsConstDataSet() |
virtual RooDataHist* | GetChainAsDataHist(RooArgSet* whichVars = NULL) |
virtual RooDataSet* | GetChainAsDataSet(RooArgSet* whichVars = NULL) |
virtual THnSparse* | GetChainAsSparseHist(RooArgSet* whichVars = NULL) |
virtual Int_t | GetDimension() const |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
virtual Double_t | GetHistCutoff() |
virtual const char* | TObject::GetIconName() const |
virtual Double_t | GetKeysPdfCutoff() |
virtual const char* | TNamed::GetName() const |
virtual RooRealVar* | GetNLLVar() const |
virtual Int_t | GetNumBurnInSteps() |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
virtual Option_t* | TObject::GetOption() const |
virtual RooArgSet* | GetParameters() const |
virtual TH1* | GetPosteriorHist() |
virtual RooNDKeysPdf* | GetPosteriorKeysPdf() |
virtual RooProduct* | GetPosteriorKeysProduct() |
virtual Double_t | GetSumOfWeights() const |
virtual const char* | TNamed::GetTitle() const |
virtual UInt_t | TObject::GetUniqueID() const |
virtual Bool_t | GetUseKeys() |
virtual RooRealVar* | GetWeightVar() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TNamed::Hash() const |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | TObject::Inspect() constMENU |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
virtual Bool_t | IsInInterval(const RooArgSet& point) const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | TNamed::IsSortable() const |
Bool_t | TObject::IsZombie() const |
virtual Double_t | LowerLimit(RooRealVar& param) |
virtual Double_t | LowerLimitByDataHist(RooRealVar& param) |
virtual Double_t | LowerLimitByHist(RooRealVar& param) |
virtual Double_t | LowerLimitByKeys(RooRealVar& param) |
virtual Double_t | LowerLimitBySparseHist(RooRealVar& param) |
virtual void | TNamed::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
RooStats::MCMCInterval | MCMCInterval(const char* name = 0) |
RooStats::MCMCInterval | MCMCInterval(const RooStats::MCMCInterval&) |
RooStats::MCMCInterval | MCMCInterval(const char* name, const RooArgSet& parameters, RooStats::MarkovChain& chain) |
virtual Bool_t | TObject::Notify() |
static void | TObject::operator delete(void* ptr) |
static void | TObject::operator delete(void* ptr, void* vp) |
static void | TObject::operator delete[](void* ptr) |
static void | TObject::operator delete[](void* ptr, void* vp) |
void* | TObject::operator new(size_t sz) |
void* | TObject::operator new(size_t sz, void* vp) |
void* | TObject::operator new[](size_t sz) |
void* | TObject::operator new[](size_t sz, void* vp) |
RooStats::MCMCInterval& | operator=(const RooStats::MCMCInterval&) |
virtual void | TObject::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | TNamed::Print(Option_t* option = "") const |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
void | TObject::ResetBit(UInt_t f) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "") |
virtual void | SetAxes(RooArgList& axes) |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
virtual void | SetChain(RooStats::MarkovChain& chain) |
virtual void | SetConfidenceLevel(Double_t cl) |
virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
static void | TObject::SetDtorOnly(void* obj) |
virtual void | SetEpsilon(Double_t epsilon) |
virtual void | SetHistStrict(Bool_t isHistStrict) |
virtual void | TNamed::SetName(const char* name)MENU |
virtual void | TNamed::SetNameTitle(const char* name, const char* title) |
virtual void | SetNumBurnInSteps(Int_t numBurnInSteps) |
static void | TObject::SetObjectStat(Bool_t stat) |
virtual void | SetParameters(const RooArgSet& parameters) |
virtual void | TNamed::SetTitle(const char* title = "")MENU |
virtual void | TObject::SetUniqueID(UInt_t uid) |
virtual void | SetUseKeys(Bool_t useKeys) |
virtual void | SetUseSparseHist(Bool_t useSparseHist) |
virtual void | ShowMembers(TMemberInspector& insp, char* parent) |
virtual Int_t | TNamed::Sizeof() const |
virtual void | Streamer(TBuffer& b) |
void | StreamerNVirtual(TBuffer& b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
virtual Double_t | UpperLimit(RooRealVar& param) |
virtual Double_t | UpperLimitByDataHist(RooRealVar& param) |
virtual Double_t | UpperLimitByHist(RooRealVar& param) |
virtual Double_t | UpperLimitByKeys(RooRealVar& param) |
virtual Double_t | UpperLimitBySparseHist(RooRealVar& param) |
virtual void | TObject::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
virtual Double_t | CalcConfLevel(Double_t cutoff, Double_t full) |
virtual void | CreateDataHist() |
virtual void | CreateHist() |
virtual void | CreateKeysDataHist() |
virtual void | CreateKeysPdf() |
virtual void | CreateSparseHist() |
virtual void | DetermineByDataHist() |
virtual void | DetermineByHist() |
virtual void | DetermineByKeys() |
virtual void | DetermineBySparseHist() |
virtual void | DetermineInterval() |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
void | TObject::MakeZombie() |
Bool_t | AcceptableConfLevel(Double_t confLevel) |
enum { | DEFAULT_NUM_BINS | |
}; | ||
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; |
RooRealVar** | fAxes | array of pointers to RooRealVars representing |
RooStats::MarkovChain* | fChain | the markov chain |
Double_t | fConfidenceLevel | Requested confidence level (eg. 0.95 for 95% CL) |
RooRealVar* | fCutoffVar | cutoff variable to use for integrating keys pdf |
RooDataHist* | fDataHist | the binned Markov Chain data |
Int_t | fDimension | number of variables |
Double_t | fEpsilon | acceptable error for Keys interval determination |
Double_t | fFull | Value of intergral of fProduct |
RooStats::Heavyside* | fHeavyside | the Heavyside function |
TH1* | fHist | the binned Markov Chain data |
Double_t | fHistConfLevel | the actual conf level determined by hist |
Double_t | fHistCutoff | cutoff bin size to be in interval |
Double_t | fIntervalSum | sum of heights of bins in the interval |
Bool_t | fIsHistStrict | whether the specified confidence level is a floor |
Double_t | fKeysConfLevel | the actual conf level determined by keys |
Double_t | fKeysCutoff | cutoff keys pdf value to be in interval |
RooDataHist* | fKeysDataHist | data hist representing product |
RooNDKeysPdf* | fKeysPdf | the kernel estimation pdf |
TString | TNamed::fName | object identifier |
Int_t | fNumBurnInSteps | number of steps to discard as burn in, starting from the first |
RooArgSet | fParameters | parameters of interest for this interval |
RooProduct* | fProduct | the (keysPdf * heavyside) product |
THnSparse* | fSparseHist | the binned Markov Chain data |
TString | TNamed::fTitle | object title |
Bool_t | fUseKeys | whether to use kernel estimation |
Bool_t | fUseSparseHist | whether to use sparse hist (vs. RooDataHist) |
kbelasco: check here for memory leak. does RooNDKeysPdf use the RooArgList passed to it or does it make a clone? also check for memory leak from chain, does RooNDKeysPdf clone that?
get the desired confidence level (see GetActualConfidenceLevel())
{return fConfidenceLevel;}
whether the specified confidence level is a floor for the actual confidence level (strict), or a ceiling (not strict)
{ fIsHistStrict = isHistStrict; }
Set the MarkovChain that this interval is based on
{ fChain = &chain; }
return a list of RooRealVars representing the axes you own the returned RooArgList
set the number of steps in the chain to discard as burn-in, starting from the first
{ fNumBurnInSteps = numBurnInSteps; }
set whether to use kernel estimation to determine the interval
{ fUseKeys = useKeys; }
set whether to use a sparse histogram. you MUST also call SetUseKeys(kFALSE) to use a histogram.
{ fUseSparseHist = useSparseHist; }
get whether we used kernel estimation to determine the interval
{ return fUseKeys; }
get the number of steps in the chain to disard as burn-in, get the number of steps in the chain to disard as burn-in, starting from the first
{ return fNumBurnInSteps; }
Get the number of parameters of interest in this interval
{ return fDimension; }
Get the markov chain on which this interval is based You do not own the returned MarkovChain*
{ return fChain; }
Get a clone of the markov chain on which this interval is based as a RooDataSet. You own the returned RooDataSet*
{ return fChain->GetAsDataSet(whichVars); }
Get the markov chain on which this interval is based as a RooDataSet. You do not own the returned RooDataSet*
{ return fChain->GetAsConstDataSet(); }
Get a clone of the markov chain on which this interval is based as a RooDataHist. You own the returned RooDataHist*
{ return fChain->GetAsDataHist(whichVars); }
Get a clone of the markov chain on which this interval is based as a THnSparse. You own the returned THnSparse*
{ return fChain->GetAsSparseHist(whichVars); }
Get a clone of the weight variable from the markov chain
{ return fChain->GetWeightVar(); }