24 while ((key = (
TKey*)next())) {
35 cbar->
AddButton( title, macro, comment, buttonType );
38 if (requiredKey !=
"") {
42 while ((key = (TKey*)next())) {
43 if (TString(key->GetName()).Contains( requiredKey )) { found =
kTRUE;
break; }
56 TString curMacroPath(
gROOT->GetMacroPath());
58 gROOT->SetMacroPath(curMacroPath+
":./:$ROOTSYS/tmva/test/:");
65 TString curIncludePath=
gSystem->GetIncludePath();
66 TString newIncludePath=TString(
"-I../ ")+curIncludePath;
67 gSystem->SetIncludePath(newIncludePath);
69 cout <<
"--- Launch TMVA GUI to view input file: " << fName << endl;
77 cout <<
"==> Abort TMVAGui, please verify filename" << endl;
83 cout <<
"==> Abort TMVAGui, please verify if dataset exist" << endl;
93 gStyle->SetScreenFactor(2);
95 TControlBar *bar=
new TControlBar(
"vertical",
"Select dataset", 0, 0);
105 bar->
AddButton(
"Quit",
".q",
"Quit",
"button");
110 gROOT->SaveContext();
120 TString defaultRequiredClassifier =
"";
126 TControlBar* cbar =
new TControlBar(
"vertical",
"TMVA Plotting Macros for Classification", 0, 0 );
128 const TString buttonType(
"button" );
134 TList* keylist =
GetKeyList(
"InputVariables" );
135 TListIter it( keylist );
138 while ((str = (TObjString*)it())) {
142 if (tmp.
Contains(
"Id" )) title =
"Input variables (training sample)";
152 it.Reset(); ch =
'a';
153 while ((str = (TObjString*)it())) {
157 if (tmp.
Contains(
"Id" )) title =
"Input variable correlations (scatter profiles)";
161 TString::Format(
"Plots all correlation profiles between '%s'-transformed input variables (macro CorrGui(...))",
172 "Plots signal and background correlation summaries for all input variables (macro correlations.C)",
179 "Plots the output of each classifier for the test data (macro mvas(...,0))",
180 buttonType, defaultRequiredClassifier );
186 "Plots the output of each classifier for the test (histograms) and training (dots) data (macro mvas(...,3))",
187 buttonType, defaultRequiredClassifier );
193 "Plots the probability of each classifier for the test data (macro mvas(...,1))",
194 buttonType, defaultRequiredClassifier );
200 "Plots the Rarity of each classifier for the test data (macro mvas(...,2)) - background distribution should be uniform",
201 buttonType, defaultRequiredClassifier );
207 "Plots signal and background efficiencies versus cut on classifier output (macro mvaeffs.cxx)",
208 buttonType, defaultRequiredClassifier );
214 "Plots background rejection vs signal efficiencies (macro efficiencies.cxx) [\"ROC\" stands for \"Receiver Operation Characteristics\"]",
215 buttonType, defaultRequiredClassifier );
221 "Plots 1/(background eff.) vs signal efficiencies (macro efficiencies.cxx) [\"ROC\" stands for \"Receiver Operation Characteristics\"]",
222 buttonType, defaultRequiredClassifier );
228 "Plots parallel coordinates for classifiers and input variables (macro paracoor.cxx, requires ROOT >= 5.17)",
229 buttonType, defaultRequiredClassifier );
235 "Plots the PDFs of the classifier output distributions for signal and background - if requested (macro probas.cxx)",
236 buttonType, defaultRequiredClassifier );
242 "Plot training history of classifiers with multiple passed (eg Neural Networks) ",
243 buttonType, defaultRequiredClassifier );
249 "Plots to verify the likelihood reference distributions (macro likelihoodrefs.cxx)",
250 buttonType,
"Likelihood" );
257 "Plots the MLP weights (macro network.cxx)",
264 "Plots error estimator versus training epoch for training and test samples (macro annconvergencetest.C)",
271 "Plots the Decision Trees trained by BDT algorithms (macro BDT(itree,...))",
278 "Plots to monitor boosting and pruning of decision trees (macro BDTControlPlots.cxx)",
289 TString::Format(
"TMVA::PlotFoams(\"%s/weights/TMVAClassification_PDEFoam.weights_foams.root\")",dataset.
Data()),
290 "Plot Foams (macro PlotFoams.cxx)",
291 buttonType,
"PDEFoam" );
297 "Plots to monitor boosting of general classifiers (macro BoostControlPlots)",
298 buttonType,
"Boost" );
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();
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).
static TList * TMVAGui_keyContent
static std::vector< TString > TMVAGui_inactiveButtons
virtual Int_t GetEntries() const
TObject * Clone(const char *newname="") const override
Make a clone of an collection using the Streamer facility.
A Control Bar is a fully user configurable tool which provides fast access to frequently used operati...
void Show()
Show control bar.
void AddSeparator()
Add separator.
void SetButtonState(const char *label, Int_t state=0)
Sets a state for control bar button 'label'; possible states are 0-kButtonUp, 1-kButtonDown,...
void SetButtonWidth(UInt_t width)
Sets the width in pixels for control bar button.
void AddButton(TControlBarButton *button)
Add button.
void SetTextColor(const char *colorName)
Sets text color for control bar buttons, e.g.:
TList * GetListOfKeys() const override
TDirectory * GetDirectory(const char *apath, Bool_t printError=false, const char *funcname="GetDirectory") override
Find a directory using apath.
virtual TList * GetListOfKeys() const
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
void Close(Option_t *option="") override
Close a file.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.
const char * GetName() const override
Returns name of object.
Collectable string class.
const TString & GetString() const
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Bool_t IsWhitespace() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
void ActionButton(TControlBar *cbar, const TString &title, const TString ¯o, const TString &comment, const TString &buttonType, TString requiredKey="")
TList * GetKeyList(const TString &pattern)
void TMVAGui(const char *fName="TMVA.root", TString dataset="")