27 const Int_t width = 650;
33 Int_t countCanvas = 0;
43 if (!
gROOT->GetClass(key->GetClassName())->InheritsFrom(
"TDirectory"))
continue;
47 cout <<
"--- Plotting deviation for method: " << methodName << endl;
55 while ((titkey = (
TKey*)keyIt())) {
57 if (!
gROOT->GetClass(titkey->GetClassName())->InheritsFrom(
"TDirectory"))
continue;
68 TString hname =
"MVA_" + methodTitle;
73 while ((dirKey = (
TKey*)dirKeyIt())){
74 if (dirKey->ReadObj()->InheritsFrom(
"TH2F")) {
75 TString s(dirKey->ReadObj()->GetName());
76 if (s.Contains(
"_reg_") &&
77 ( (showTarget && s.Contains(
"_tgt")) || (!showTarget && !s.Contains(
"_tgt")) ) &&
78 s.Contains( (htype ==
kCompareType ?
"train" :
"test" ))) {
79 c[countCanvas] =
new TCanvas(
Form(
"canvas%d", countCanvas+1),
80 Form(
"Regression output deviation versus %s for method: %s",
81 (showTarget ?
"target" :
"input variables"), methodName.
Data() ),
82 countCanvas*50+100, (countCanvas+1)*20, width, (
Int_t)width*0.72 );
84 TH1*
h = (
TH1*)dirKey->ReadObj();
85 h->
SetTitle(
Form(
"Output deviation for method: %s (%s sample)",
94 cout <<
"plotting logo" << endl;
98 TString fname =
Form(
"plots/deviation_%s_%s_%s_c%i",
100 (showTarget ?
"target" :
"vars"),
101 (htype ==
kCompareType ?
"training" :
"test" ), countPlots );
void imgconv(TCanvas *c, const TString &fname)
virtual TList * GetListOfKeys() const
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
Collectable string class.
R__EXTERN TStyle * gStyle
TFile * OpenFile(const TString &fin)
virtual TList * GetListOfKeys() const
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
const char * Data() const
void SetNumberContours(Int_t number=20)
Set the default number of contour levels when drawing 2-d plots.
void GetMethodTitle(TString &name, TKey *ikey)
Book space in a file, create I/O buffers, to fill them, (un)compress them.
std::string GetMethodName(TCppMethod_t)
void Initialize(Bool_t useTMVAStyle=kTRUE)
virtual void Draw(Option_t *option="")
Draw this histogram with options.
char * Form(const char *fmt,...)
virtual const char * GetName() const
Returns name of object.
void plot_logo(Float_t v_scale=1.0, Float_t skew=1.0)
Describe directory structure in memory.
Bool_t Contains(const char *name) const
virtual void SetLineStyle(Style_t lstyle)
virtual void SetRightMargin(Float_t rightmargin)
Set Pad right margin in fraction of the pad width.
virtual void Add(TObject *obj)
virtual void SetTitle(const char *title)
Change (i.e.
virtual void Update()
Update canvas pad buffers.
void deviations(TString fin="TMVAReg.root", HistType htype=kMVAType, Bool_t showTarget=kTRUE, Bool_t useTMVAStyle=kTRUE)