18 TIter next( TMVARegGui_keyContent );
20 while ((key = (
TKey*)next())) {
31 cbar->
AddButton( title, macro, comment, buttonType );
34 if (requiredKey !=
"") {
36 TIter next( TMVARegGui_keyContent );
38 while ((key = (
TKey*)next())) {
41 if (!found) TMVARegGui_inactiveButtons.push_back( title );
54 gROOT->SetMacroPath(curMacroPath+
":./:$ROOTSYS/tmva/test/:");
66 cout <<
"--- Launch TMVA GUI to view input file: " << fName << endl;
69 TMVARegGui_inactiveButtons.clear();
74 cout <<
"==> Abort TMVARegGui, please verify filename" << endl;
80 cout <<
"==> Abort TMVARegGui, please verify if dataset exist" << endl;
102 bar->
AddButton(
"Quit",
".q",
"Quit",
"button");
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 );
244 for (
UInt_t i=0; i<TMVARegGui_inactiveButtons.size(); i++) cbar->
SetButtonState( TMVARegGui_inactiveButtons[i], 3 );
245 if (TMVARegGui_inactiveButtons.size() > 0) {
246 cout <<
"=== Note: inactive buttons indicate that the corresponding methods were not trained ===" << endl;
249 gROOT->SaveContext();
void Show()
Show control bar.
virtual const char * GetName() const
Returns name of object.
void AddButton(TControlBarButton *button)
Add button.
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
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
virtual Int_t GetEntries() const
static std::vector< TString > TMVARegGui_inactiveButtons
UInt_t GetListOfKeys(TList &keys, TString inherits, TDirectory *dir=0)
TList * RegGuiGetKeyList(const TString &pattern)
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
static TList * TMVARegGui_keyContent
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.
const TString & GetString() const
R__EXTERN TSystem * gSystem
void SetScreenFactor(Float_t factor=1)
char * Form(const char *fmt,...)
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
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.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual void Add(TObject *obj)
virtual TList * GetListOfKeys() const
void AddSeparator()
Add separator.
void Reset()
Reset list iterator.
void TMVARegGui(const char *fName="TMVAReg.root", TString dataset="")
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,.
Bool_t IsWhitespace() const
void RegGuiActionButton(TControlBar *cbar, const TString &title, const TString ¯o, const TString &comment, const TString &buttonType, TString requiredKey="")
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.
const char * Data() const