24 while ((key = (
TKey*)next())) {
42 while ((key = (
TKey*)next())) {
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;
105 bar->
AddButton(
"Quit",
".q",
"Quit",
"button");
110 gROOT->SaveContext();
139 TString tmp = str->GetString();
141 tmp.ReplaceAll(
"InputVariables_",
"").Data() );
142 if (tmp.Contains(
"Id" )) title =
"Input variables (training sample)";
145 TString::Format(
"TMVA::variables(\"%s\",\"%s\",\"%s\",\"%s\")",dataset.Data(), fName, str->GetString().Data(), title.
Data() ),
146 TString::Format(
"Plots all '%s'-transformed input variables (macro variables(...))", str->GetString().Data() ),
152 it.Reset(); ch =
'a';
154 TString tmp = str->GetString();
156 tmp.ReplaceAll(
"InputVariables_",
"").Data() );
157 if (tmp.Contains(
"Id" )) title =
"Input variable correlations (scatter profiles)";
160 TString::Format(
"TMVA::CorrGui(\"%s\",\"%s\",\"%s\",\"%s\")",dataset.Data(), fName, str->GetString().Data(), title.
Data() ),
161 TString::Format(
"Plots all correlation profiles between '%s'-transformed input variables (macro CorrGui(...))",
162 str->GetString().Data() ),
168 title =
TString::Format(
"(%i) Input Variable Linear Correlation Coefficients", ++
ic );
171 TString::Format(
"TMVA::correlations(\"%s\",\"%s\")",dataset.Data(), fName ),
172 "Plots signal and background correlation summaries for all input variables (macro correlations.C)",
175 title =
TString::Format(
"(%ia) Classifier Output Distributions (test sample)", ++
ic );
178 TString::Format(
"TMVA::mvas(\"%s\",\"%s\", TMVA::kMVAType)",dataset.Data(), fName ),
179 "Plots the output of each classifier for the test data (macro mvas(...,0))",
182 title =
TString::Format(
"(%ib) Classifier Output Distributions (test and training samples superimposed)",
ic );
185 TString::Format(
"TMVA::mvas(\"%s\",\"%s\", TMVA::kCompareType )",dataset.Data(), fName),
186 "Plots the output of each classifier for the test (histograms) and training (dots) data (macro mvas(...,3))",
189 title =
TString::Format(
"(%ic) Classifier Probability Distributions (test sample)",
ic );
192 TString::Format(
"TMVA::mvas(\"%s\",\"%s\", TMVA::kProbaType)",dataset.Data(), fName ),
193 "Plots the probability of each classifier for the test data (macro mvas(...,1))",
196 title =
TString::Format(
"(%id) Classifier Rarity Distributions (test sample)",
ic );
199 TString::Format(
"TMVA::mvas(\"%s\",\"%s\", TMVA::kRarityType)",dataset.Data(), fName ),
200 "Plots the Rarity of each classifier for the test data (macro mvas(...,2)) - background distribution should be uniform",
206 TString::Format(
"TMVA::mvaeffs(\"%s\",\"%s\")",dataset.Data(), fName ),
207 "Plots signal and background efficiencies versus cut on classifier output (macro mvaeffs.cxx)",
210 title =
TString::Format(
"(%ib) Classifier Background Rejection vs Signal Efficiency (ROC curve)",
ic );
213 TString::Format(
"TMVA::efficiencies(\"%s\",\"%s\")",dataset.Data(), fName ),
214 "Plots background rejection vs signal efficiencies (macro efficiencies.cxx) [\"ROC\" stands for \"Receiver Operation Characteristics\"]",
217 title =
TString::Format(
"(%ib) Classifier 1/(Backgr. Efficiency) vs Signal Efficiency (ROC curve)",
ic );
220 TString::Format(
"TMVA::efficiencies(\"%s\",\"%s\",%d)",dataset.Data(), fName, 3 ),
221 "Plots 1/(background eff.) vs signal efficiencies (macro efficiencies.cxx) [\"ROC\" stands for \"Receiver Operation Characteristics\"]",
224 title =
TString::Format(
"(%i) Parallel Coordinates (requires ROOT-version >= 5.17)", ++
ic );
227 TString::Format(
"TMVA::paracoor(\"%s\",\"%s\")",dataset.Data(), fName ),
228 "Plots parallel coordinates for classifiers and input variables (macro paracoor.cxx, requires ROOT >= 5.17)",
231 title =
TString::Format(
"(%i) PDFs of Classifiers (requires \"CreateMVAPdfs\" option set)", ++
ic );
234 TString::Format(
"TMVA::probas(\"%s\",\"%s\")",dataset.Data(), fName ),
235 "Plots the PDFs of the classifier output distributions for signal and background - if requested (macro probas.cxx)",
241 TString::Format(
"TMVA::training_history(\"%s\",\"%s\")",dataset.Data(), fName ),
242 "Plot training history of classifiers with multiple passed (eg Neural Networks) ",
248 TString::Format(
"TMVA::likelihoodrefs(\"%s\",\"%s\")",dataset.Data(), fName ),
249 "Plots to verify the likelihood reference distributions (macro likelihoodrefs.cxx)",
257 "Plots the MLP weights (macro network.cxx)",
263 TString::Format(
"TMVA::annconvergencetest(\"%s\",\"%s\")",dataset.Data(), fName ),
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,...))",
277 TString::Format(
"TMVA::BDTControlPlots(\"%s\",\"%s\")",dataset.Data() , fName ),
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)",
296 TString::Format(
"TMVA::BoostControlPlots(\"%s\",\"%s\")",dataset.Data() , fName ),
297 "Plots to monitor boosting of general classifiers (macro BoostControlPlots)",
300 cbar->AddSeparator();
305 cbar->SetTextColor(
"black");
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();
bool Bool_t
Boolean (0=false, 1=true) (bool)
int Int_t
Signed integer 4 bytes (int)
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
static TList * TMVAGui_keyContent
static std::vector< TString > TMVAGui_inactiveButtons
R__EXTERN TStyle * gStyle
R__EXTERN TSystem * gSystem
virtual Int_t GetEntries() const
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 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 named "apath".
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
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 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.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
void SetScreenFactor(Float_t factor=1)
virtual const char * GetIncludePath()
Get the list of include path.
virtual void SetIncludePath(const char *includePath)
IncludePath should contain the list of compiler flags to indicate where to find user defined header f...
UInt_t GetListOfKeys(TList &keys, TString inherits, TDirectory *dir=nullptr)
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="")