52using std::cout, std::endl;
70 for (i = 0; i < dim; i++) {
75 char *mu_name =
Form(
"mu_x%d", i);
76 mu_x =
new RooRealVar(mu_name, mu_name, 0, -2, 2);
81 for (i = 0; i < nPOI; i++) {
82 poi.
add(*muVec.
at(i));
87 for (i = 0; i < dim; i++) {
88 for (j = 0; j < dim; j++) {
101 std::unique_ptr<RooDataSet>
data{mvg.generate(xVec, 100)};
106 modelConfig.SetPdf(mvg);
107 modelConfig.SetParametersOfInterest(poi);
115 std::unique_ptr<RooFitResult>
fit{mvg.fitTo(*
data,
Save(
true))};
125 mc.SetConfidenceLevel(0.95);
126 mc.SetNumBurnInSteps(100);
127 mc.SetNumIters(10000);
129 mc.SetProposalFunction(*pdfProp);
136 plc.SetConfidenceLevel(0.95);
143 mcPlot.SetLineColor(
kGreen);
144 mcPlot.SetLineWidth(2);
154 cout <<
"MCMC interval: [" << ll <<
", " << ul <<
"]" << endl;
163 cout <<
"MCMC interval on p0: [" << ll <<
", " << ul <<
"]" << endl;
166 cout <<
"MCMC interval on p1: [" << ll <<
", " << ul <<
"]" << endl;
171 mcPlot.DrawChainScatter(*p0, *p1);
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Int_t getSize() const
Return the number of elements in the collection.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooAbsArg * at(Int_t idx) const
Return object at given index, or nullptr if index is out of range.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Multivariate Gaussian p.d.f.
Variable that can be changed from the outside.
This class provides simple and straightforward utilities to plot a LikelihoodInterval object.
LikelihoodInterval is a concrete implementation of the RooStats::ConfInterval interface.
Bayesian Calculator estimating an interval or a credible region using the Markov-Chain Monte Carlo me...
This class provides simple and straightforward utilities to plot a MCMCInterval object.
MCMCInterval is a concrete implementation of the RooStats::ConfInterval interface.
virtual double UpperLimit(RooRealVar ¶m)
get the highest value of param that is within the confidence interval
virtual RooArgList * GetAxes()
return a list of RooRealVars representing the axes you own the returned RooArgList
virtual double LowerLimit(RooRealVar ¶m)
get the lowest value of param that is within the confidence interval
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
The ProfileLikelihoodCalculator is a concrete implementation of CombinedCalculator (the interface cla...
ProposalFunction is an interface for all proposal functions that would be used with a Markov Chain Mo...
virtual void SetCovMatrix(const TMatrixDSym &covMatrix)
set the covariance matrix to use for a multi-variate Gaussian proposal
virtual ProposalFunction * GetProposalFunction()
Get the ProposalFunction that we've been designing.
virtual void SetVariables(RooArgList &vars)
virtual void SetCacheSize(Int_t size)
virtual void SetUpdateProposalParameters(bool updateParams)
Persistable container for RooFit projects.
void Update() override
Update canvas pad buffers.
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
void Print(Option_t *option="") const override
Print the real and cpu time passed between the start and stop events.
RooCmdArg Save(bool flag=true)
fit(model, train_loader, val_loader, num_epochs, batch_size, optimizer, criterion, save_best, scheduler)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Namespace for the RooStats classes.