16 HistType htype ,
Bool_t showTarget,
Bool_t useTMVAStyle )
32 Int_t countCanvas = 0;
39 while ((key = (
TKey*)next())) {
42 if (!
gROOT->GetClass(key->GetClassName())->InheritsFrom(
"TDirectory"))
continue;
46 cout <<
"--- Plotting deviation for method: " << methodName << endl;
54 while ((titkey = (
TKey*)keyIt())) {
56 if (!
gROOT->GetClass(titkey->
GetClassName())->InheritsFrom(
"TDirectory"))
continue;
67 TString hname =
"MVA_" + methodTitle;
72 while ((dirKey = (
TKey*)dirKeyIt())){
75 if (s.Contains(
"_reg_") &&
76 ( (showTarget && s.Contains(
"_tgt")) || (!showTarget && !s.Contains(
"_tgt")) ) &&
77 s.Contains( (htype == kCompareType ?
"train" :
"test" ))) {
79 TString::Format(
"Regression output deviation versus %s for method: %s",
80 (showTarget ?
"target" :
"input variables"), methodName.Data() ),
85 hname.
Data(), (htype == kCompareType ?
"training" :
"test" )) );
88 TLine*
l =
new TLine(
h->GetXaxis()->GetXmin(), 0,
h->GetXaxis()->GetXmax(), 0 );
93 cout <<
"plotting logo" << endl;
95 c[countCanvas]->Update();
100 (showTarget ?
"target" :
"vars"),
101 (htype ==
kCompareType ?
"training" :
"test" ), countPlots );
R__EXTERN TStyle * gStyle
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual void SetRightMargin(Float_t rightmargin)
Set Pad right margin in fraction of the pad width.
Bool_t Contains(const char *name) const
TDirectory * GetDirectory(const char *apath, Bool_t printError=false, const char *funcname="GetDirectory") override
Find a directory named "apath".
Describe directory structure in memory.
virtual TList * GetListOfKeys() const
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
TH1 is the base class of all histogram classes in ROOT.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual const char * GetClassName() const
virtual TObject * ReadObj()
To read a TObject* from the file.
Use the TLine constructor to create a simple line.
void Add(TObject *obj) override
const char * GetName() const override
Returns name of object.
Collectable string class.
virtual const char * GetName() const
Returns name of object.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
const char * Data() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
void SetNumberContours(Int_t number=20)
Set the default number of contour levels when drawing 2-d plots.
void Initialize(Bool_t useTMVAStyle=kTRUE)
void GetMethodTitle(TString &name, TKey *ikey)
void plot_logo(Float_t v_scale=1.0, Float_t skew=1.0)
TFile * OpenFile(const TString &fin)
void GetMethodName(TString &name, TKey *mkey)
void imgconv(TCanvas *c, const TString &fname)
void deviations(TString dataset, TString fin="TMVAReg.root", HistType htype=kMVAType, Bool_t showTarget=kTRUE, Bool_t useTMVAStyle=kTRUE)