22 TString dirname=
"Method_Boost";
25 cout <<
"Could not locate directory 'Method_Boost' in file " << fin << endl;
29 TIter keyIter(&titles);
33 boostdir = (TDirectory *)key->
ReadObj();
40 const Int_t nPlots = 6;
45 const TString titName = boostdir->
GetName();
54 TString hname[nPlots]={
"BoostWeight",
"MethodWeight",
"ErrFraction",
"SoverBtotal",
"SeparationGain",
"SeparationGain"};
59 for (
Int_t i=0; i<nPlots; i++){
61 TH1 *
h = (TH1*) boostdir->
Get(hname[i]);
63 h->SetMaximum(
h->GetMaximum()*1.3);
65 h->SetMarkerColor(color);
66 h->SetMarkerSize( 0.7 );
67 h->SetMarkerStyle( 24 );
69 h->SetLineColor(color);
76 TString hname_roctest[2] ={
"ROCIntegral_test",
"ROCIntegralBoosted_test"};
77 TString hname_roctrain[2]={
"ROCIntegral_train",
"ROCIntegralBoosted_train"};
78 TString htitle[2] = {
"ROC integral of single classifier",
"ROC integral of boosted method"};
80 for (
Int_t i=0; i<2; i++){
82 TPad * cPad = (TPad*)
c->cd(nPlots+i+1);
83 TH1 *htest = (TH1*) boostdir->
Get(hname_roctest[i]);
84 TH1 *htrain = (TH1*) boostdir->
Get(hname_roctrain[i]);
88 Bool_t histFilled = (htest && htrain);
90 if (!htest) htest =
new TH1F(
"htest",
"",2,0,1);
91 if (!htrain) htrain =
new TH1F(
"htrain",
"",2,0,1);
109 htrain->
Draw(
"same");
116 legend->
AddEntry(htest, TString(
"testing sample"),
"L");
117 legend->
AddEntry(htrain, TString(
"training sample (orig. weights)"),
"L");
121 legend->
Draw(
"same");
127 t.
DrawTextNDC( .2, 0.6,
"Use MethodBoost option: \"Boost_DetailedMonitoring\" " );
128 t.
DrawTextNDC( .2, 0.51,
"to fill this histograms" );
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
Float_t GetLeftMargin() const
Float_t GetBottomMargin() const
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
TDirectory * GetDirectory(const char *apath, Bool_t printError=false, const char *funcname="GetDirectory") override
Find a directory using apath.
Describe directory structure in memory.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
void SetTitle(const char *title) override
Change/set the title.
virtual void SetMaximum(Double_t maximum=-1111)
void Draw(Option_t *option="") override
Draw this histogram with options.
virtual void SetMinimum(Double_t minimum=-1111)
virtual TObject * ReadObj()
To read a TObject* from the file.
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
void Draw(Option_t *option="") override
Draw this box with its current attributes.
void SetMargin(Float_t margin)
const char * GetName() const override
Returns name of object.
virtual const char * GetName() const
Returns name of object.
virtual void SetBorderSize(Int_t bordersize=4)
Sets the border size of the TPave box and shadow.
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.
virtual TText * DrawTextNDC(Double_t x, Double_t y, const char *text)
UInt_t GetListOfTitles(TDirectory *rfdir, TList &titles)
void Initialize(Bool_t useTMVAStyle=kTRUE)
TKey * NextKey(TIter &keyIter, TString className)
TFile * OpenFile(const TString &fin)
void imgconv(TCanvas *c, const TString &fname)
void boostcontrolplots(TString dataset, TDirectory *boostdir)
void BoostControlPlots(TString dataset, TString fin="TMVA.root", Bool_t useTMVAStyle=kTRUE)