16 HistType htype ,
Bool_t showTarget,
Bool_t useTMVAStyle )
32 Int_t countCanvas = 0;
37 TIter next(
file->GetDirectory(dataset.
Data())->GetListOfKeys());
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" ))) {
78 c[countCanvas] =
new TCanvas(
Form(
"canvas%d", countCanvas+1),
79 Form(
"Regression output deviation versus %s for method: %s",
80 (showTarget ?
"target" :
"input variables"), methodName.Data() ),
84 h->SetTitle(
Form(
"Output deviation for method: %s (%s sample)",
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();
97 TString fname =
Form(
"%s/plots/deviation_%s_%s_%s_c%i",
100 (showTarget ?
"target" :
"vars"),
101 (htype ==
kCompareType ?
"training" :
"test" ), countPlots );
include TDocParser_001 C image html pict1_TDocParser_001 png width
char * Form(const char *fmt,...)
R__EXTERN TStyle * gStyle
virtual void SetRightMargin(Float_t rightmargin)
Set Pad right margin in fraction of the pad width.
Bool_t Contains(const char *name) const
Describe directory structure in memory.
virtual TList * GetListOfKeys() const
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
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.
virtual void Add(TObject *obj)
virtual const char * GetName() const
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
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)