17 HistType htype ,
Bool_t showTarget,
Bool_t useTMVAStyle )
33 Int_t countCanvas = 0;
38 TIter next(
file->GetDirectory(dataset.
Data())->GetListOfKeys());
40 while ((key = (
TKey*)next())) {
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())){
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() ),
83 c[countCanvas]->SetRightMargin(0.10);
85 h->SetTitle(
Form(
"Output deviation for method: %s (%s sample)",
86 hname.
Data(), (htype == kCompareType ?
"training" :
"test" )) );
89 TLine*
l =
new TLine(
h->GetXaxis()->GetXmin(), 0,
h->GetXaxis()->GetXmax(), 0 );
94 cout <<
"plotting logo" << endl;
96 c[countCanvas]->Update();
98 TString fname =
Form(
"%s/plots/deviation_%s_%s_%s_c%i",
101 (showTarget ?
"target" :
"vars"),
102 (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
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.
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.
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".
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.
std::string GetMethodName(TCppMethod_t)
static constexpr double s
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 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)