24 TIter next( TMVAGui_keyContent );
26 while ((key = (
TKey*)next())) {
37 cbar->
AddButton( title, macro, comment, buttonType );
40 if (requiredKey !=
"") {
42 TIter next( TMVAGui_keyContent );
44 while ((key = (
TKey*)next())) {
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;
85 cout <<
"==> Abort TMVAGui, please verify if dataset exist" << endl;
107 bar->
AddButton(
"Quit",
".q",
"Quit",
"button");
112 gROOT->SaveContext();
122 TString defaultRequiredClassifier =
"";
130 const TString buttonType(
"button" );
142 TString title =
Form(
"Input variables '%s'-transformed (training sample)",
144 if (tmp.
Contains(
"Id" )) title =
"Input variables (training sample)";
146 Form(
"(%i%c) %s", ic, ch++, title.
Data() ),
148 Form(
"Plots all '%s'-transformed input variables (macro variables(...))", str->
GetString().
Data() ),
154 it.
Reset(); ch =
'a';
157 TString title =
Form(
"Input variable correlations '%s'-transformed (scatter profiles)",
159 if (tmp.
Contains(
"Id" )) title =
"Input variable correlations (scatter profiles)";
161 Form(
"(%i%c) %s", ic, ch++, title.
Data() ),
163 Form(
"Plots all correlation profiles between '%s'-transformed input variables (macro CorrGui(...))",
170 title =
Form(
"(%i) Input Variable Linear Correlation Coefficients", ++ic );
173 Form(
"TMVA::correlations(\"%s\",\"%s\")",dataset.
Data(), fName ),
174 "Plots signal and background correlation summaries for all input variables (macro correlations.C)",
177 title =
Form(
"(%ia) Classifier Output Distributions (test sample)", ++ic );
180 Form(
"TMVA::mvas(\"%s\",\"%s\", TMVA::kMVAType)",dataset.
Data(), fName ),
181 "Plots the output of each classifier for the test data (macro mvas(...,0))",
182 buttonType, defaultRequiredClassifier );
184 title =
Form(
"(%ib) Classifier Output Distributions (test and training samples superimposed)", ic );
187 Form(
"TMVA::mvas(\"%s\",\"%s\", TMVA::kCompareType )",dataset.
Data(), fName),
188 "Plots the output of each classifier for the test (histograms) and training (dots) data (macro mvas(...,3))",
189 buttonType, defaultRequiredClassifier );
191 title =
Form(
"(%ic) Classifier Probability Distributions (test sample)", ic );
194 Form(
"TMVA::mvas(\"%s\",\"%s\", TMVA::kProbaType)",dataset.
Data(), fName ),
195 "Plots the probability of each classifier for the test data (macro mvas(...,1))",
196 buttonType, defaultRequiredClassifier );
198 title =
Form(
"(%id) Classifier Rarity Distributions (test sample)", ic );
201 Form(
"TMVA::mvas(\"%s\",\"%s\", TMVA::kRarityType)",dataset.
Data(), fName ),
202 "Plots the Rarity of each classifier for the test data (macro mvas(...,2)) - background distribution should be uniform",
203 buttonType, defaultRequiredClassifier );
205 title =
Form(
"(%ia) Classifier Cut Efficiencies", ++ic );
208 Form(
"TMVA::mvaeffs(\"%s\",\"%s\")",dataset.
Data(), fName ),
209 "Plots signal and background efficiencies versus cut on classifier output (macro mvaeffs.cxx)",
210 buttonType, defaultRequiredClassifier );
212 title =
Form(
"(%ib) Classifier Background Rejection vs Signal Efficiency (ROC curve)", ic );
215 Form(
"TMVA::efficiencies(\"%s\",\"%s\")",dataset.
Data(), fName ),
216 "Plots background rejection vs signal efficiencies (macro efficiencies.cxx) [\"ROC\" stands for \"Receiver Operation Characteristics\"]",
217 buttonType, defaultRequiredClassifier );
219 title =
Form(
"(%ib) Classifier 1/(Backgr. Efficiency) vs Signal Efficiency (ROC curve)", ic );
222 Form(
"TMVA::efficiencies(\"%s\",\"%s\",%d)",dataset.
Data(), fName, 3 ),
223 "Plots 1/(background eff.) vs signal efficiencies (macro efficiencies.cxx) [\"ROC\" stands for \"Receiver Operation Characteristics\"]",
224 buttonType, defaultRequiredClassifier );
226 title =
Form(
"(%i) Parallel Coordinates (requires ROOT-version >= 5.17)", ++ic );
229 Form(
"TMVA::paracoor(\"%s\",\"%s\")",dataset.
Data(), fName ),
230 "Plots parallel coordinates for classifiers and input variables (macro paracoor.cxx, requires ROOT >= 5.17)",
231 buttonType, defaultRequiredClassifier );
234 #if ROOT_VERSION_CODE < ROOT_VERSION(5,17,0) 235 TMVAGui_inactiveButtons.push_back( title );
238 title =
Form(
"(%i) PDFs of Classifiers (requires \"CreateMVAPdfs\" option set)", ++ic );
241 Form(
"TMVA::probas(\"%s\",\"%s\")",dataset.
Data(), fName ),
242 "Plots the PDFs of the classifier output distributions for signal and background - if requested (macro probas.cxx)",
243 buttonType, defaultRequiredClassifier );
245 title =
Form(
"(%i) Likelihood Reference Distributiuons", ++ic);
248 Form(
"TMVA::likelihoodrefs(\"%s\",\"%s\")",dataset.
Data(), fName ),
249 "Plots to verify the likelihood reference distributions (macro likelihoodrefs.cxx)",
250 buttonType,
"Likelihood" );
252 title =
Form(
"(%ia) Network Architecture (MLP)", ++ic );
253 TString call =
Form(
"TMVA::network(\"%s\",\"%s\")", dataset.
Data(),fName );
257 "Plots the MLP weights (macro network.cxx)",
260 title =
Form(
"(%ib) Network Convergence Test (MLP)", ic );
263 Form(
"TMVA::annconvergencetest(\"%s\",\"%s\")",dataset.
Data(), fName ),
264 "Plots error estimator versus training epoch for training and test samples (macro annconvergencetest.C)",
267 title =
Form(
"(%i) Decision Trees (BDT)", ++ic );
270 Form(
"TMVA::BDT(\"%s\",\"%s\")",dataset.
Data() , fName ),
271 "Plots the Decision Trees trained by BDT algorithms (macro BDT(itree,...))",
274 title =
Form(
"(%i) Decision Tree Control Plots (BDT)", ++ic );
277 Form(
"TMVA::BDTControlPlots(\"%s\",\"%s\")",dataset.
Data() , fName ),
278 "Plots to monitor boosting and pruning of decision trees (macro BDTControlPlots.cxx)",
286 title =
Form(
"(%i) Plot Foams (PDEFoam)", ++ic );
289 Form(
"TMVA::PlotFoams(\"%s/weights/TMVAClassification_PDEFoam.weights_foams.root\")",dataset.
Data()),
290 "Plot Foams (macro PlotFoams.cxx)",
291 buttonType,
"PDEFoam" );
293 title =
Form(
"(%i) General Boost Control Plots", ++ic );
296 Form(
"TMVA::BoostControlPlots(\"%s\",\"%s\")",dataset.
Data() , fName ),
297 "Plots to monitor boosting of general classifiers (macro BoostControlPlots)",
298 buttonType,
"Boost" );
302 cbar->
AddButton(
Form(
"(%i) Quit", ++ic ),
".q",
"Quit", buttonType );
314 for (
UInt_t i=0; i<TMVAGui_inactiveButtons.size(); i++) cbar->
SetButtonState(TMVAGui_inactiveButtons[i], 3 );
315 if (TMVAGui_inactiveButtons.size() > 0) {
316 cout <<
"=== Note: inactive buttons indicate classifiers that were not trained, ===" << endl;
317 cout <<
"=== or functionalities that were not invoked during the training ===" << endl;
320 gROOT->SaveContext();
void Show()
Show control bar.
virtual Int_t GetEntries() const
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.
Collectable string class.
TString & ReplaceAll(const TString &s1, const TString &s2)
R__EXTERN TStyle * gStyle
virtual TList * GetListOfKeys() const
void TMVAGui(const char *fName="TMVA.root", TString dataset="")
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
UInt_t GetListOfKeys(TList &keys, TString inherits, TDirectory *dir=0)
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
const char * Data() const
Book space in a file, create I/O buffers, to fill them, (un)compress them.
void SetButtonWidth(UInt_t width)
Sets the width in pixels for control bar button.
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
void SetScreenFactor(Float_t factor=1)
char * Form(const char *fmt,...)
Bool_t IsWhitespace() const
virtual const char * GetName() const
Returns name of object.
virtual TDirectory * GetDirectory(const char *apath, Bool_t printError=false, const char *funcname="GetDirectory")
Find a directory named "apath".
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.