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();
67 TString newIncludePath=TString(
"-I../ ")+curIncludePath;
68 gSystem->SetIncludePath(newIncludePath);
69 std::cout <<
"new include path="<<
gSystem->GetIncludePath()<<std::endl;
71 std::cout <<
"--- Launch TMVA GUI to view input file: " << fName << std::endl;
79 std::cout <<
"==> Abort TMVAMultiClassGui, please verify filename" << std::endl;
85 cout <<
"==> Abort TMVAGui, please verify if dataset exist" << endl;
95 gStyle->SetScreenFactor(2);
97 TControlBar *bar=
new TControlBar(
"vertical",
"Select dataset", 0, 0);
107 bar->
AddButton(
"Quit",
".q",
"Quit",
"button");
112 gROOT->SaveContext();
122 TString defaultRequiredClassifier =
"";
128 TControlBar* cbar =
new TControlBar(
"vertical",
"TMVA Plotting Macros for Multiclass Classification", 0, 0 );
130 const TString buttonType(
"button" );
137 TListIter it( keylist );
140 while ((str = (TObjString*)it())) {
144 if (tmp.
Contains(
"Id" )) title =
"Input variables (training sample)";
154 it.Reset(); ch =
'a';
155 while ((str = (TObjString*)it())) {
159 if (tmp.
Contains(
"Id" )) title =
"Input variable correlations (scatter profiles)";
163 TString::Format(
"Plots all correlation profiles between '%s'-transformed input variables (macro CorrGuiMultiClass(...))",
174 "Plots signal and background correlation summaries for all input variables (macro correlationsMultiClass.cxx)",
180 TString::Format(
"TMVA::mvasMulticlass(\"%s\",\"%s\",TMVA::kMVAType)",dataset.
Data() , fName ),
181 "Plots the output of each classifier for the test data (macro mvas(...,0))",
182 buttonType, defaultRequiredClassifier );
187 TString::Format(
"TMVA::mvasMulticlass(\"%s\",\"%s\",TMVA::kCompareType)",dataset.
Data(), fName ),
188 "Plots the output of each classifier for the test (histograms) and training (dots) data (macro mvas(...,3))",
189 buttonType, defaultRequiredClassifier );
216 cbar, title,
TString::Format(
"TMVA::efficienciesMulticlass1vsRest(\"%s\", \"%s\")", dataset.
Data(), fName),
217 "Plots background rejection vs signal efficiencies (macro efficienciesMulticlass.cxx) [\"ROC\" stands "
218 "for \"Receiver Operation Characteristics\"]",
219 buttonType, defaultRequiredClassifier);
230 cbar, title,
TString::Format(
"TMVA::efficienciesMulticlass1vs1(\"%s\", \"%s\")", dataset.
Data(), fName),
231 "Plots background rejection vs signal efficiencies (macro efficienciesMulticlass.cxx) [\"ROC\" stands "
232 "for \"Receiver Operation Characteristics\"]",
233 buttonType, defaultRequiredClassifier);
270 "Plots the MLP weights (macro network.cxx)",
277 "Plots error estimator versus training epoch for training and test samples (macro annconvergencetest.cxx)",
284 "Plots the Decision Trees trained by BDT algorithms (macro BDT(itree,...))",
299 TString::Format(
"TMVA::PlotFoams(\"%s/weights/TMVAMulticlass_PDEFoam.weights_foams.root\")",dataset.
Data()),
300 "Plot Foams (macro PlotFoams.cxx)",
301 buttonType,
"PDEFoam" );
326 std::cout <<
"=== Note: inactive buttons indicate that the corresponding classifiers were not trained ===" << std::endl;
329 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 * TMVAMultiClassGui_keyContent
static std::vector< TString > TMVAMultiClassGui_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 TMVAMultiClassGui(const char *fName="TMVAMulticlass.root", TString dataset="")
void MultiClassActionButton(TControlBar *cbar, const TString &title, const TString ¯o, const TString &comment, const TString &buttonType, TString requiredKey="")
TList * MultiClassGetKeyList(const TString &pattern)