31 cbar->
AddButton( title, macro, comment, buttonType );
34 if (requiredKey !=
"") {
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;
83 TString defaultRequiredClassifier =
"";
91 const TString buttonType(
"button" );
103 TString title =
Form(
"Input variables and target(s) '%s'-transformed (training sample)",
105 if (tmp.
Contains(
"Id" )) title =
"Input variables and target(s) (training sample)";
107 Form(
" (%i%c) %s ", ic, ch++, title.
Data() ),
109 Form(
"Plots all '%s'-transformed input variables and target(s) (macro variables(...))",
116 it.
Reset(); ch =
'a';
119 TString title =
Form(
"Input variable correlations '%s'-transformed (scatter profiles)",
121 if (tmp.
Contains(
"Id" )) title =
"Input variable correlations (scatter profiles)";
123 Form(
"(%i%c) %s", ic, ch++, title.
Data() ),
125 Form(
"Plots all correlation profiles between '%s'-transformed input variables (macro CorrGui(...))",
132 Form(
"(%i) Input Variable Linear Correlation Coefficients", ++ic ),
133 Form(
"TMVA::correlations(\"%s\",kTRUE)", fName ),
134 "Plots signal and background correlation summaries for all input variables (macro correlations.cxx)",
138 Form(
"(%ia) Regression Output Deviation versus Target (test sample)", ++ic ),
139 Form(
"TMVA::deviations(\"%s\",TMVA::kMVAType,kTRUE)", fName ),
140 "Plots the deviation between regression output and target versus target on test data (macro deviations(...,0))",
141 buttonType, defaultRequiredClassifier );
144 Form(
"(%ib) Regression Output Deviation versus Target (training sample)", ic ),
145 Form(
"TMVA::deviations(\"%s\",TMVA::kCompareType,kTRUE)", fName ),
146 "Plots the deviation between regression output and target versus target on test data (macro deviations(...,0))",
147 buttonType, defaultRequiredClassifier );
150 Form(
"(%ic) Regression Output Deviation versus Input Variables (test sample)", ic ),
151 Form(
"TMVA::deviations(\"%s\",TMVA::kMVAType,kFALSE)", fName ),
152 "Plots the deviation between regression output and target versus target on test data (macro deviations(...,0))",
153 buttonType, defaultRequiredClassifier );
156 Form(
" (%id) Regression Output Deviation versus Input Variables (training sample) ", ic ),
157 Form(
"TMVA::deviations(\"%s\",TMVA::kCompareType,kFALSE)", fName ),
158 "Plots the deviation between regression output and target versus target on test data (macro deviations(...,0))",
159 buttonType, defaultRequiredClassifier );
162 Form(
"(%i) Summary of Average Regression Deviations ", ++ic ),
163 Form(
"TMVA::regression_averagedevs(\"%s\")", fName ),
164 "Plot Summary of average deviations: MVAvalue - target (macro regression_averagedevs.cxx)",
168 Form(
"(%ia) Network Architecture", ++ic ),
169 Form(
"TMVA::network(\"%s\")", fName ),
170 "Plots the MLP weights (macro network.cxx)",
174 Form(
"(%ib) Network Convergence Test", ic ),
175 Form(
"TMVA::annconvergencetest(\"%s\")", fName ),
176 "Plots error estimator versus training epoch for training and test samples (macro annconvergencetest.cxx)",
180 Form(
"(%i) Plot Foams", ++ic ),
181 "TMVA::PlotFoams(\"weights/TMVARegression_PDEFoam.weights_foams.root\")",
182 "Plot Foams (macro PlotFoams.cxx)",
183 buttonType,
"PDEFoam" );
186 Form(
"(%i) Regression Trees (BDT)", ++ic ),
187 Form(
"TMVA::BDT_Reg(\"%s\")", fName ),
188 "Plots the Regression Trees trained by BDT algorithms (macro BDT_Reg(itree,...))",
192 Form(
"(%i) Regression Tree Control Plots (BDT)", ++ic ),
193 Form(
"TMVA::BDTControlPlots(\"%s\")", fName ),
194 "Plots to monitor boosting and pruning of regression trees (macro BDTControlPlots.cxx)",
199 cbar->
AddButton(
Form(
"(%i) Quit", ++ic ),
".q",
"Quit", buttonType );
211 for (
UInt_t i=0; i<TMVARegGui_inactiveButtons.size(); i++) cbar->
SetButtonState( TMVARegGui_inactiveButtons[i], 3 );
212 if (TMVARegGui_inactiveButtons.size() > 0) {
213 cout <<
"=== Note: inactive buttons indicate that the corresponding methods were not trained ===" << endl;
216 gROOT->SaveContext();
void Show()
Show control bar.
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.
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
Collectable string class.
TString & ReplaceAll(const TString &s1, const TString &s2)
virtual TList * GetListOfKeys() const
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
static std::vector< TString > TMVARegGui_inactiveButtons
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.
virtual TObject * Clone(const char *newname="") const
Make a clone of an collection using the Streamer facility.
const char * Data() const
static TList * TMVARegGui_keyContent
Book space in a file, create I/O buffers, to fill them, (un)compress them.
TString GetString() const
R__EXTERN TSystem * gSystem
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
char * Form(const char *fmt,...)
virtual const char * GetName() const
Returns name of object.
virtual const char * GetIncludePath()
Get the list of include path.
void TMVARegGui(const char *fName="TMVAReg.root")
virtual void Add(TObject *obj)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
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,.
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.