16 HistType htype ,
Bool_t showTarget,
Bool_t useTMVAStyle )
20 gStyle->SetNumberContours(999);
26 const Int_t width = 650;
32 Int_t countCanvas = 0;
39 while ((key = (TKey*)next())) {
41 if (!TString(key->GetName()).BeginsWith(
"Method_"))
continue;
42 if (!
gROOT->GetClass(key->GetClassName())->InheritsFrom(
"TDirectory"))
continue;
46 cout <<
"--- Plotting deviation for method: " << methodName << endl;
48 TDirectory* mDir = (TDirectory*)key->ReadObj();
50 TList* jobNames =
new TList();
54 while ((titkey = (TKey*)keyIt())) {
56 if (!
gROOT->GetClass(titkey->
GetClassName())->InheritsFrom(
"TDirectory"))
continue;
58 TDirectory *titDir = (TDirectory *)titkey->
ReadObj();
60 TObjString *jN =
new TObjString( titDir->
GetName() );
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() ),
81 countCanvas*50+100, (countCanvas+1)*20, width, (
Int_t)width*0.72 );
82 c[countCanvas]->SetRightMargin(0.10);
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 );
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
Bool_t Contains(const char *name) const
TDirectory * GetDirectory(const char *apath, Bool_t printError=false, const char *funcname="GetDirectory") override
Find a directory using apath.
virtual TList * GetListOfKeys() const
virtual const char * GetClassName() const
virtual TObject * ReadObj()
To read a TObject* from the file.
void Add(TObject *obj) override
const char * GetName() const override
Returns name of object.
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
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
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)