TMVAGui in Root 6

How do I run the TMVAGui in Root 6?
Before it was at $ROOTSYS/test/TMVAGui.C
Now I do not know where is it or how to call it?
It runs fine at the end of the training but now I have the TMVA.root file and do not know how to run the Gui again.

Just type at the prompt:

root[]  TMVA::TMVAGui(“TMVA.root”)

Lorenzo

Dear all,

That solution is not working for me:
root [0] TMVA::TMVAGui(TMVA.root)
error:
TMVA::TMVAGui(TMVA.root)
root [1] .x TMVAGui.C
— Launch TMVA GUI to view input file: TMVA.root
=== Note: inactive buttons indicate classifiers that were not trained, ===
=== or functionalities that were not invoked during the training ===

And when trying to visualize, .e.g., “Input variables”, I get:

root [2] Error in TApplication::ExecuteFile: macro variables.C not found in path .:/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/macros::./:$ROOTSYS/tmva/test/:

If I just use ROOT 6 out of ATLASLocalRootBase I get the same error:
root [2] Error in TApplication::ExecuteFile: macro variables.C not found in path .:/exper-sw/sw/sl6/x86_64/gcc48/root/6.00.00/macros::./:$ROOTSYS/tmva/test/:

How to fix it?

Thank you in advance for help.

Best wishes,
Helena

Dear ROOT forum,

for me, the new TMVA::TMVAGui(“myfile.root”) way of accessing the Gui works.

However, as usual it is very inconvenient to have to get the plots one by one by actively clicking on the various buttons (particularly if working, as usual, over an ssh connection). Furthermore, the default extension is eps.

Is there a way of:

  • printing all the available plots in a batch session (or in a non-batch session, but without having to load the graphic list of buttons) with a single command? Once upon a time I used to have modified the ancient macro by removing the buttons stuff and just calling one after the other the various methods that paint the various plots

  • set as default the creation of pdf files instead of eps?

Thanks in advance.

Best,
Pietro

Hi again,

I tried to build my personalized macro, in order to avoid the tmvagui graphics, that is very inconvenient for batch runs.

What I am doing is:

TString dataset(""); // This is the only one that enables the following command to find classifier types/instances
TMVA::efficiencies(dataset, "TMVA_old_1l_high.root");

However, the plots path is broken:

root [0] 
Processing plotAll.C...
--- Opening root file TMVA_old_1l_high.root in read mode
--- Found 1 classifier types
--- Found 1 instance(s) of the method Method_BDT
--- Found 1 classifier types
--- Found 1 instance(s) of the method Method_BDT
ERROR in TPostScript::Open: Cannot open file:/plots/rejBvsS.eps
Warning in <TColor::TColor>: color 600 already defined
Error in <TPostScript::Text>: Cannot open temporary file: /plots/rejBvsS.eps_tmp_7228

Is there a way to tell TMVA::efficiencies(…) to use a relative path (i.e. “./plots” instead of “/plots”), without having to recompile ROOT? And also possibly for changing the eps format to pdf+png?

Line 203 of root.cern.ch/doc/v608/efficienc … ource.html suggests it is not possible unless dataset=="./", but doing so results in segmentation violation.

Thanks in advance!

Best,
Pietro

Hi Pietro,

Thanks for the feedback and sorry for the super long delay in answering :open_mouth:

There is currently no way of running the GUI in batch mode. Your request is very reasonable, I’ll add a feature request ticket to the TMVA issue tracker immediately.

For modifications to the plotting functions, this also sounds reasonable but I would have to look into it. I’ll add a ticket for this as well.

Cheers,
Kim

Hi Kim,

I know this is over a year later, but was there ever any development to not have to use the Gui for TMVA to view and obtain plots via TMVA::TMVAGui(“myfile.root”)? As Pietro pointed out, it is inconvenient to have to do this over an ssh connection. I’m also interested in not having the default extension as eps.

Thanks,
Mel

Hi,

Unfortunately there has not been any progress so far. You can monitor it here. It is good that you ping us about it, this will make us aware that there is a need for implementation :slight_smile:

Cheers,
Kim

Thanks for the link to check the progress!

Hi all,

I have a question related to this (so perfectly ‘compliant’ with the post title, so not to require another post) but not on the “main” question (run in batch mode).

In the “old” version of TMVAGui (TMVAGui.C) the “aesthetics” of the plots produced and also the kind of files saved (as asked also by Pietro) could be changed by editing tmvaglob.C.
Now still we get sentences like:

--- --------------------------------------------------------------------
--- If you want to save the image as eps, gif or png, please comment out 
--- the corresponding lines (line no. 239-241) in tmvaglob.C
--- --------------------------------------------------------------------

but currently this (I think) cannot be done: in the ROOT installation one has the tmvaglob.h file but not the tmvaglob.C. Modify the tmvaglob.h file, deep in the installation, would be not so “elegant” but, more important, to really modify the important things one should modify the tmvaglob.C file (only in the source) and then recompile ROOT… Isn’t it?
The “aesthetical” stuff can be worked around by defining, by hand, a TStyle, called “MVA”, so that TMVA will find it already defined and will use this. I verified it and is working.
To have TMVAGlob producing also the pdfs (for example) I didn’t find any solution…

Am I missing something?

Ciao,
Matteo