37 cbar->
AddButton( title, macro, comment, buttonType );
40 if (requiredKey !=
"") {
47 if (!found) TMVAGui_inactiveButtons.push_back( title );
60 gROOT->SetMacroPath(curMacroPath+
":./:$ROOTSYS/tmva/test/:");
71 cout <<
"--- Launch TMVA GUI to view input file: " << fName << endl;
74 TMVAGui_inactiveButtons.clear();
79 cout <<
"==> Abort TMVAGui, please verify filename" << endl;
88 TString defaultRequiredClassifier =
"";
96 const TString buttonType(
"button" );
110 if (tmp.
Contains(
"Id" )) title =
"Input variables (training sample)";
112 Form(
"(%i%c) %s", ic, ch++, title.
Data() ),
114 Form(
"Plots all '%s'-transformed input variables (macro variables(...))", str->
GetString().
Data() ),
120 it.
Reset(); ch =
'a';
123 TString title =
Form(
"Input variable correlations '%s'-transformed (scatter profiles)",
125 if (tmp.
Contains(
"Id" )) title =
"Input variable correlations (scatter profiles)";
127 Form(
"(%i%c) %s", ic, ch++, title.
Data() ),
129 Form(
"Plots all correlation profiles between '%s'-transformed input variables (macro CorrGui(...))",
136 title =
Form(
"(%i) Input Variable Linear Correlation Coefficients", ++ic );
139 Form(
"TMVA::correlations(\"%s\")", fName ),
140 "Plots signal and background correlation summaries for all input variables (macro correlations.C)",
143 title =
Form(
"(%ia) Classifier Output Distributions (test sample)", ++ic );
146 Form(
"TMVA::mvas(\"%s\", TMVA::kMVAType)", fName ),
147 "Plots the output of each classifier for the test data (macro mvas(...,0))",
148 buttonType, defaultRequiredClassifier );
150 title =
Form(
"(%ib) Classifier Output Distributions (test and training samples superimposed)", ic );
153 Form(
"TMVA::mvas(\"%s\", TMVA::kCompareType )", fName),
154 "Plots the output of each classifier for the test (histograms) and training (dots) data (macro mvas(...,3))",
155 buttonType, defaultRequiredClassifier );
157 title =
Form(
"(%ic) Classifier Probability Distributions (test sample)", ic );
160 Form(
"TMVA::mvas(\"%s\", TMVA::kProbaType)", fName ),
161 "Plots the probability of each classifier for the test data (macro mvas(...,1))",
162 buttonType, defaultRequiredClassifier );
164 title =
Form(
"(%id) Classifier Rarity Distributions (test sample)", ic );
167 Form(
"TMVA::mvas(\"%s\", TMVA::kRarityType)", fName ),
168 "Plots the Rarity of each classifier for the test data (macro mvas(...,2)) - background distribution should be uniform",
169 buttonType, defaultRequiredClassifier );
171 title =
Form(
"(%ia) Classifier Cut Efficiencies", ++ic );
174 Form(
"TMVA::mvaeffs(\"%s\")", fName ),
175 "Plots signal and background efficiencies versus cut on classifier output (macro mvaeffs.cxx)",
176 buttonType, defaultRequiredClassifier );
178 title =
Form(
"(%ib) Classifier Background Rejection vs Signal Efficiency (ROC curve)", ic );
181 Form(
"TMVA::efficiencies(\"%s\")", fName ),
182 "Plots background rejection vs signal efficiencies (macro efficiencies.cxx) [\"ROC\" stands for \"Receiver Operation Characteristics\"]",
183 buttonType, defaultRequiredClassifier );
185 title =
Form(
"(%ib) Classifier 1/(Backgr. Efficiency) vs Signal Efficiency (ROC curve)", ic );
188 Form(
"TMVA::efficiencies(\"%s\",%d)", fName, 3 ),
189 "Plots 1/(background eff.) vs signal efficiencies (macro efficiencies.cxx) [\"ROC\" stands for \"Receiver Operation Characteristics\"]",
190 buttonType, defaultRequiredClassifier );
192 title =
Form(
"(%i) Parallel Coordinates (requires ROOT-version >= 5.17)", ++ic );
195 Form(
"TMVA::paracoor(\"%s\")", fName ),
196 "Plots parallel coordinates for classifiers and input variables (macro paracoor.cxx, requires ROOT >= 5.17)",
197 buttonType, defaultRequiredClassifier );
200 #if ROOT_VERSION_CODE < ROOT_VERSION(5,17,0)
201 TMVAGui_inactiveButtons.push_back( title );
204 title =
Form(
"(%i) PDFs of Classifiers (requires \"CreateMVAPdfs\" option set)", ++ic );
207 Form(
"TMVA::probas(\"%s\")", fName ),
208 "Plots the PDFs of the classifier output distributions for signal and background - if requested (macro probas.cxx)",
209 buttonType, defaultRequiredClassifier );
211 title =
Form(
"(%i) Likelihood Reference Distributiuons", ++ic);
214 Form(
"TMVA::likelihoodrefs(\"%s\")", fName ),
215 "Plots to verify the likelihood reference distributions (macro likelihoodrefs.cxx)",
216 buttonType,
"Likelihood" );
218 title =
Form(
"(%ia) Network Architecture (MLP)", ++ic );
219 TString call =
Form(
"TMVA::network(\"%s\")", fName );
223 "Plots the MLP weights (macro network.cxx)",
226 title =
Form(
"(%ib) Network Convergence Test (MLP)", ic );
229 Form(
"TMVA::annconvergencetest(\"%s\")", fName ),
230 "Plots error estimator versus training epoch for training and test samples (macro annconvergencetest.C)",
233 title =
Form(
"(%i) Decision Trees (BDT)", ++ic );
236 Form(
"TMVA::BDT(\"%s\")", fName ),
237 "Plots the Decision Trees trained by BDT algorithms (macro BDT(itree,...))",
240 title =
Form(
"(%i) Decision Tree Control Plots (BDT)", ++ic );
243 Form(
"TMVA::BDTControlPlots(\"%s\")", fName ),
244 "Plots to monitor boosting and pruning of decision trees (macro BDTControlPlots.cxx)",
252 title =
Form(
"(%i) Plot Foams (PDEFoam)", ++ic );
255 Form(
"TMVA::PlotFoams(\"weights/TMVAClassification_PDEFoam.weights_foams.root\")"),
256 "Plot Foams (macro PlotFoams.cxx)",
257 buttonType,
"PDEFoam" );
259 title =
Form(
"(%i) General Boost Control Plots", ++ic );
262 Form(
"TMVA::BoostControlPlots(\"%s\")", fName ),
263 "Plots to monitor boosting of general classifiers (macro BoostControlPlots)",
264 buttonType,
"Boost" );
268 cbar->
AddButton(
Form(
"(%i) Quit", ++ic ),
".q",
"Quit", buttonType );
280 for (
UInt_t i=0; i<TMVAGui_inactiveButtons.size(); i++) cbar->
SetButtonState(TMVAGui_inactiveButtons[i], 3 );
281 if (TMVAGui_inactiveButtons.size() > 0) {
282 cout <<
"=== Note: inactive buttons indicate classifiers that were not trained, ===" << endl;
283 cout <<
"=== or functionalities that were not invoked during the training ===" << endl;
286 gROOT->SaveContext();
void Show()
Show control bar.
void AddButton(TControlBarButton *button)
Add button.
TList * GetKeyList(const TString &pattern)
A Control Bar is a fully user configurable tool which provides fast access to frequently used operati...
void SetTextColor(const char *colorName)
Sets text color for control bar buttons, e.g.
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
Collectable string class.
TString & ReplaceAll(const TString &s1, const TString &s2)
virtual TList * GetListOfKeys() const
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
virtual TObject * Clone(const char *newname="") const
Make a clone of an collection using the Streamer facility.
const char * Data() const
void TMVAGui(const char *fName="TMVA.root")
Book space in a file, create I/O buffers, to fill them, (un)compress them.
void ActionButton(TControlBar *cbar, const TString &title, const TString ¯o, const TString &comment, const TString &buttonType, TString requiredKey="")
TString GetString() const
R__EXTERN TSystem * gSystem
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
char * Form(const char *fmt,...)
virtual const char * GetName() const
Returns name of object.
virtual const char * GetIncludePath()
Get the list of include path.
static std::vector< TString > TMVAGui_inactiveButtons
virtual void Add(TObject *obj)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
static TList * TMVAGui_keyContent
void AddSeparator()
Add separator.
void Reset()
Reset list iterator.
void SetButtonState(const char *label, Int_t state=0)
Sets a state for control bar button 'label'; possible states are 0-kButtonUp, 1-kButtonDown, 2-kButtonEngaged, 3-kButtonDisabled,.
virtual void SetIncludePath(const char *includePath)
IncludePath should contain the list of compiler flags to indicate where to find user defined header f...
virtual void Close(Option_t *option="")
Close a file.