71MetropolisHastings::MetropolisHastings()
101 coutE(
Eval) <<
"Critical members unintialized: parameters, proposal " <<
102 " function, or (log) likelihood function" << endl;
106 coutE(
Eval) <<
"Please set type and sign of your function using "
107 <<
"MetropolisHastings::SetType() and MetropolisHastings::SetSign()" <<
126 Double_t xL = 0.0, xPrimeL = 0.0,
a = 0.0;
143 bool hadEvalError =
true;
153 while (i < 1000 && hadEvalError) {
163 hadEvalError =
false;
168 hadEvalError =
false;
171 hadEvalError =
false;
176 coutE(
Eval) <<
"Problem finding a good starting point in " <<
177 "MetropolisHastings::ConstructChain() " << endl;
186 hadEvalError =
false;
252 coutI(
Eval) <<
"Proposal acceptance rate: " <<
254 coutI(
Eval) <<
"Number of steps in chain: " << numAccepted << endl;
281 if (-1.0 * rand >=
a)
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Double_t getVal(const RooArgSet *set=0) const
Evaluate object. Returns either cached value or triggers a recalculation.
static Int_t numEvalErrors()
Return the number of logged evaluation errors since the last clearing.
static void setEvalErrorLoggingMode(ErrorLoggingMode m)
Set evaluation error logging mode.
static void clearEvalErrorLog()
Clear the stack of evaluation error messages.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
virtual Bool_t add(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
virtual void addClone(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling addOwned() for each element in the source...
static RooMsgService & instance()
Return reference to singleton instance.
void setGlobalKillBelow(RooFit::MsgLevel level)
RooFit::MsgLevel globalKillBelow() const
static Double_t infinity()
Return internal infinity representation.
static Double_t uniform(TRandom *generator=randomGenerator())
Return a number uniformly distributed from (0,1)
Stores the steps in a Markov Chain of points.
virtual void Add(RooArgSet &entry, Double_t nllValue, Double_t weight=1.0)
safely add an entry to the chain
virtual void SetParameters(RooArgSet ¶meters)
set which of your parameters this chain should store
virtual Int_t Size() const
get the number of steps in the chain
This class uses the Metropolis-Hastings algorithm to construct a Markov Chain of data points using Mo...
virtual void SetProposalFunction(ProposalFunction &proposalFunction)
virtual Bool_t ShouldTakeStep(Double_t d)
virtual void SetParameters(const RooArgSet &set)
virtual MarkovChain * ConstructChain()
virtual Double_t CalcNLL(Double_t xL)
ProposalFunction * fPropFunc
ProposalFunction is an interface for all proposal functions that would be used with a Markov Chain Mo...
virtual void Propose(RooArgSet &xPrime, RooArgSet &x)=0
Populate xPrime with the new proposed point, possibly based on the current point x.
virtual Double_t GetProposalDensity(RooArgSet &x1, RooArgSet &x2)=0
Return the probability of proposing the point x1 given the starting point x2.
virtual Bool_t IsSymmetric(RooArgSet &x1, RooArgSet &x2)=0
Determine whether or not the proposal density is symmetric for points x1 and x2 - that is,...
Mother of all ROOT objects.
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
@(#)root/roostats:$Id$ Author: George Lewis, Kyle Cranmer
void SetParameters(const RooArgSet *desiredVals, RooArgSet *paramsToChange)
void RandomizeCollection(RooAbsCollection &set, Bool_t randomizeConstants=kTRUE)