20 while ((key = (
TKey*)next())) {
31 cbar->
AddButton( title, macro, comment, buttonType );
34 if (requiredKey !=
"") {
38 while ((key = (
TKey*)next())) {
54 gROOT->SetMacroPath(curMacroPath+
":./:$ROOTSYS/tmva/test/:");
66 cout <<
"--- Launch TMVA GUI to view input file: " << fName << endl;
74 cout <<
"==> Abort TMVARegGui, please verify filename" << endl;
78 if(
file->GetListOfKeys()->GetEntries()<=0)
80 cout <<
"==> Abort TMVARegGui, please verify if dataset exist" << endl;
83 if( (dataset==
""||dataset.
IsWhitespace()) && (
file->GetListOfKeys()->GetEntries()==1))
87 }
else if((dataset==
""||dataset.
IsWhitespace()) && (
file->GetListOfKeys()->GetEntries()>=1))
93 bar->SetButtonWidth(300);
94 for(
int i=0;i<
file->GetListOfKeys()->GetEntries();i++)
98 bar->AddButton(dataset.
Data(),
Form(
"TMVA::TMVARegGui(\"%s\",\"%s\")",fName,dataset.
Data()),dataset.
Data());
102 bar->AddButton(
"Quit",
".q",
"Quit",
"button");
105 bar->SetTextColor(
"black");
107 gROOT->SaveContext();
116 TString defaultRequiredClassifier =
"";
124 const TString buttonType(
"button" );
136 TString title =
Form(
"Input variables and target(s) '%s'-transformed (training sample)",
138 if (tmp.
Contains(
"Id" )) title =
"Input variables and target(s) (training sample)";
140 Form(
" (%i%c) %s ", ic, ch++, title.
Data() ),
141 Form(
"TMVA::variables(\"%s\",\"%s\",\"%s\",\"%s\",kTRUE)",dataset.
Data() , fName, str->
GetString().
Data(), title.
Data() ),
142 Form(
"Plots all '%s'-transformed input variables and target(s) (macro variables(...))",
149 it.Reset(); ch =
'a';
152 TString title =
Form(
"Input variable correlations '%s'-transformed (scatter profiles)",
154 if (tmp.
Contains(
"Id" )) title =
"Input variable correlations (scatter profiles)";
156 Form(
"(%i%c) %s", ic, ch++, title.
Data() ),
157 Form(
"TMVA::CorrGui(\"%s\",\"%s\",\"%s\",\"%s\",kTRUE)",dataset.
Data() , fName, str->
GetString().
Data(), title.
Data() ),
158 Form(
"Plots all correlation profiles between '%s'-transformed input variables (macro CorrGui(...))",
165 Form(
"(%i) Input Variable Linear Correlation Coefficients", ++ic ),
166 Form(
"TMVA::correlations(\"%s\",\"%s\",kTRUE)",dataset.
Data(), fName ),
167 "Plots signal and background correlation summaries for all input variables (macro correlations.cxx)",
171 Form(
"(%ia) Regression Output Deviation versus Target (test sample)", ++ic ),
172 Form(
"TMVA::deviations(\"%s\",\"%s\",TMVA::kMVAType,kTRUE)",dataset.
Data(), fName ),
173 "Plots the deviation between regression output and target versus target on test data (macro deviations(...,0))",
174 buttonType, defaultRequiredClassifier );
177 Form(
"(%ib) Regression Output Deviation versus Target (training sample)", ic ),
178 Form(
"TMVA::deviations(\"%s\",\"%s\",TMVA::kCompareType,kTRUE)",dataset.
Data() , fName ),
179 "Plots the deviation between regression output and target versus target on test data (macro deviations(...,0))",
180 buttonType, defaultRequiredClassifier );
183 Form(
"(%ic) Regression Output Deviation versus Input Variables (test sample)", ic ),
184 Form(
"TMVA::deviations(\"%s\",\"%s\",TMVA::kMVAType,kFALSE)",dataset.
Data(), fName ),
185 "Plots the deviation between regression output and target versus target on test data (macro deviations(...,0))",
186 buttonType, defaultRequiredClassifier );
189 Form(
" (%id) Regression Output Deviation versus Input Variables (training sample) ", ic ),
190 Form(
"TMVA::deviations(\"%s\",\"%s\",TMVA::kCompareType,kFALSE)",dataset.
Data() , fName ),
191 "Plots the deviation between regression output and target versus target on test data (macro deviations(...,0))",
192 buttonType, defaultRequiredClassifier );
195 Form(
"(%i) Summary of Average Regression Deviations ", ++ic ),
196 Form(
"TMVA::regression_averagedevs(\"%s\",\"%s\")",dataset.
Data() , fName ),
197 "Plot Summary of average deviations: MVAvalue - target (macro regression_averagedevs.cxx)",
201 Form(
"(%ia) Network Architecture", ++ic ),
202 Form(
"TMVA::network(\"%s\",\"%s\")",dataset.
Data(), fName ),
203 "Plots the MLP weights (macro network.cxx)",
207 Form(
"(%ib) Network Convergence Test", ic ),
208 Form(
"TMVA::annconvergencetest(\"%s\",\"%s\")",dataset.
Data() , fName ),
209 "Plots error estimator versus training epoch for training and test samples (macro annconvergencetest.cxx)",
213 Form(
"(%i) Plot Foams", ++ic ),
214 Form(
"TMVA::PlotFoams(\"%s/weights/TMVARegression_PDEFoam.weights_foams.root\")",dataset.
Data()),
215 "Plot Foams (macro PlotFoams.cxx)",
216 buttonType,
"PDEFoam" );
219 Form(
"(%i) Regression Trees (BDT)", ++ic ),
220 Form(
"TMVA::BDT_Reg(\"%s\",\"%s\")",dataset.
Data() , fName ),
221 "Plots the Regression Trees trained by BDT algorithms (macro BDT_Reg(itree,...))",
225 Form(
"(%i) Regression Tree Control Plots (BDT)", ++ic ),
226 Form(
"TMVA::BDTControlPlots(\"%s\",\"%s\")",dataset.
Data(), fName ),
227 "Plots to monitor boosting and pruning of regression trees (macro BDTControlPlots.cxx)",
232 cbar->
AddButton(
Form(
"(%i) Quit", ++ic ),
".q",
"Quit", buttonType );
246 cout <<
"=== Note: inactive buttons indicate that the corresponding methods were not trained ===" << endl;
249 gROOT->SaveContext();
static TList * TMVARegGui_keyContent
static std::vector< TString > TMVARegGui_inactiveButtons
char * Form(const char *fmt,...)
R__EXTERN TStyle * gStyle
R__EXTERN TSystem * gSystem
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 AddButton(TControlBarButton *button)
Add button.
void SetTextColor(const char *colorName)
Sets text color for control bar buttons, e.g.
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=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual void Add(TObject *obj)
virtual const char * GetName() const
Returns name of object.
Collectable string class.
const TString & GetString() const
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
Bool_t IsWhitespace() const
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...
static constexpr double bar
UInt_t GetListOfKeys(TList &keys, TString inherits, TDirectory *dir=0)
TList * RegGuiGetKeyList(const TString &pattern)
void TMVARegGui(const char *fName="TMVAReg.root", TString dataset="")
void RegGuiActionButton(TControlBar *cbar, const TString &title, const TString ¯o, const TString &comment, const TString &buttonType, TString requiredKey="")