34 const Int_t width = 600;
40 Int_t countCanvas = 0;
48 if (!
gROOT->GetClass(key->GetClassName())->InheritsFrom(
"TDirectory"))
continue;
57 while ((titkey = (
TKey*)keyIt())) {
59 if (!
gROOT->GetClass(titkey->GetClassName())->InheritsFrom(
"TDirectory"))
continue;
65 cout <<
"--- Found directory for method: " << methodName <<
"::" << methodTitle << endl;
66 TString hname =
"MVA_" + methodTitle;
67 for(
UInt_t icls = 0; icls < classnames.size(); ++icls){
70 std::vector<TString>::iterator classiter = classnames.begin();
71 for(; classiter!=classnames.end(); ++classiter){
73 +
"_prob_for_" + *classiter);
76 cout <<
":\t mva distribution not available (this is normal for Cut classifier)" << endl;
84 ((
TH1*)hists.
First())->SetTitle(
Form(
"TMVA response for classifier: %s", methodTitle.
Data() ));
89 Form(
"TMVA response for class %s %s", classnames.at(icls).Data(),methodTitle.
Data()) :
90 Form(
"TMVA comparison for class %s %s", classnames.at(icls).Data(),methodTitle.
Data())) ;
92 c =
new TCanvas(
Form(
"canvas%d", countCanvas+1), ctitle,
93 countCanvas*50+200, countCanvas*20, width, (
Int_t)width*0.78 );
103 if(((
TH1*)hists[i])->GetMaximum() > histmax)
104 histmax = ((
TH1*)hists[i])->GetMaximum();
120 frame->
GetXaxis()->
SetTitle( methodTitle +
" response for "+classnames.at(icls));
134 classiter = classnames.begin();
142 legend->
Draw(
"same");
147 ((
TH1*)hists[i])->Draw(
"histsame");
149 ((
TH1*)hists[i])->GetYaxis()->SetTitle( ytit );
158 classiter = classnames.begin();
159 for(; classiter!=classnames.end(); ++classiter){
161 +
"_prob_for_" + *classiter);
164 cout <<
":\t comparison histogram for overtraining check not available!" << endl;
175 classiter = classnames.begin();
177 legend2->
AddEntry(((
TH1*)othists[i]),*classiter+
" (training sample)",
"P");
180 legend2->
Draw(
"same");
185 if(((
TH1*)othists[i])->GetMaximum() > histmax)
186 histmax = ((
TH1*)othists[i])->GetMaximum();
191 Int_t col = ((
TH1*)hists[i])->GetLineColor();
192 ((
TH1*)othists[i])->SetMarkerSize( 0.7 );
193 ((
TH1*)othists[i])->SetMarkerStyle( 20 );
194 ((
TH1*)othists[i])->SetMarkerColor( col );
195 ((
TH1*)othists[i])->SetLineWidth( 1 );
196 ((
TH1*)othists[i])->Draw(
"e1same");
199 ymax = histmax*maxMult;
205 ((
TH1*)hists[i])->SetLineWidth( 1 );
211 cout <<
"--- Perform Kolmogorov-Smirnov tests" << endl;
212 cout <<
"--- Goodness of consistency for class " << classnames.at(icls)<< endl;
215 Float_t kol = ((
TH1*)hists[j])->KolmogorovTest(((
TH1*)othists[j]),
"X");
216 cout << classnames.at(j) <<
": " << kol << endl;
229 frame->
Draw(
"sameaxis");
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title Offset is a correction factor with respect to the "s...
void imgconv(TCanvas *c, const TString &fname)
This class displays a legend box (TPaveText) containing several legend entries.
virtual void SetLimits(Double_t xmin, Double_t xmax)
virtual TList * GetListOfKeys() const
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
TFile * OpenFile(const TString &fin)
virtual TList * GetListOfKeys() const
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes.
std::vector< TString > GetClassNames(TDirectory *dir)
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
void NormalizeHist(TH1 *h)
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
void SetFrameStyle(TH1 *frame, Float_t scale=1.0)
void SetMargin(Float_t margin)
virtual void SetFillStyle(Style_t fstyle)
Int_t GetEntriesFast() const
const char * Data() const
Float_t GetTopMargin() const
Float_t GetRightMargin() const
void GetMethodTitle(TString &name, TKey *ikey)
TObject * First() const
Return the object in the first slot.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
void SetMultiClassStyle(TObjArray *hists)
std::string GetMethodName(TCppMethod_t)
void Initialize(Bool_t useTMVAStyle=kTRUE)
virtual void Draw(Option_t *option="")
Draw this histogram with options.
2-D histogram with a float per channel (see TH1 documentation)}
char * Form(const char *fmt,...)
void plot_logo(Float_t v_scale=1.0, Float_t skew=1.0)
void mvasMulticlass(TString fin="TMVAMulticlass.root", HistType htype=kMVAType, Bool_t useTMVAStyle=kTRUE)
Float_t GetLeftMargin() const
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
Describe directory structure in memory.
Mother of all ROOT objects.
virtual TVirtualPad * GetPad(Int_t subpadnumber) const
Get a pointer to subpadnumber of this pad.
virtual void Update()
Update canvas pad buffers.
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
virtual void SetBorderSize(Int_t bordersize=4)
virtual void SetLeftMargin(Float_t leftmargin)
Set Pad left margin in fraction of the pad width.