"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "root/tmva/test/README" of archive root_v5.20.00.win32gcc.tar.gz:


As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
    1 Dear TMVA User,
    2 
    3 this README contains three sections
    4 
    5   + Overview 
    6   + How to run the example
    7   + The TMVA GUI
    8 
    9 Overview
   10 ========
   11 
   12   This directory contains two files that illustrate the usage of the
   13   TMVA package to perform a MultiVariate Analysis. It also contains a
   14   GUI for easy access to the training result.
   15 
   16   An MV analysis is executed in two steps, the training of the MVA
   17   methods, and the application of the best suited MVA method to your
   18   dataset. These two steps are shown in the files TMVAnalysis.C and
   19   TMVApplication.C, respectively.
   20 
   21   The example uses some toy data (tmva_example.root) that comes with
   22   the sourceforge distribution or is available on the ROOT web. The
   23   example files contains a signal and a background tree with four
   24   variables.
   25 
   26 
   27   TMVAnalysis.C
   28   -------------
   29 
   30   TMVAnalysis.C explains the usage of the TMVA::Factory class, which
   31   is the framework for the whole training process. The following steps
   32   are taken:
   33 
   34   1st: The factory is created (a name for the project is specified,
   35   which will help with the bookkeeping of different training cycles)
   36 
   37   2nd: The input data trees are made available to the factory ( one
   38   can also use text files as input, also shown in this example ). The
   39   sizes of the training and the testing data samples are also specified.
   40 
   41   3rd: The variables that are selected to be used in the MVA are
   42   declared to the factory
   43 
   44   4th: The factory needs to transfer the input data into the local
   45   data structure used for the training and testing
   46 
   47   5th: Methods are than booked with the factory. For each method
   48   number of options can be set that steer the training behavior. The
   49   options are described in greater detail in the method classes and
   50   can be looked at in the CVS web-viewer
   51 
   52   6th: The training of all methods on the training data sample is run
   53   by the factory. The training results for each method are stored in
   54   the directory weights/
   55 
   56   7th: The testing of all methods on the testing data sample is run by
   57   the factory. The test results are stored in a root file (filename
   58   specified in the Factory constructor)
   59 
   60   8th: The performance of all methods is analyzed by the factory. The
   61   performance results are stored in the root file (see last step)
   62 
   63 
   64   TMVApplication.C 
   65   ----------------
   66 
   67   TMVApplication.C explains the usage of the TMVA::Reader class, which
   68   is to be used to evaluate your data with the trained MVA
   69   methods. The following steps are taken:
   70 
   71   1st: The reader is created.
   72 
   73   2nd: A set of local variables is created and declared to the reader.
   74 
   75   3rd: The method(s) - which means the name of the weight files
   76   created in the training process - are booked with the reader.
   77 
   78   4th: Your event loop:
   79      - The values of the local variables are set (either by assignment
   80      of, as in the example, by setting the BranchAddresses of your
   81      datatree)
   82      - the reader is asked to evaluate the MVA, the result of which is
   83      used to separate signal from background
   84 
   85 
   86 How to run the example
   87 ======================
   88 
   89   First, TMVAnalysis.C needs to be run to perform the training. You
   90   can edit TMVAnalysis.C (boolean flags at the head of the file) to
   91   enable (disable) the methods you would (not) like to use. Then run
   92 
   93   > root TMVAnalysis.C
   94 
   95   Add the end a file TMVA.root is written, and a GUI opens. Once
   96   TMVA.root exists, the GUI can also be started via
   97 
   98   > root TMVAGui.C
   99 
  100   You can also run
  101 
  102   > root TMVApplication.C 
  103 
  104   which evaluates the methods on the signal data from the toy
  105   tmva_example.root and writes the result to TMVApp.root. However,
  106   TMVApplication is more of a pedagogical example for the usage of
  107   TMVA inside your own analysis framework.
  108 
  109 
  110 The TMVA GUI
  111 ============
  112 
  113   The GUI provides easy access to a large number of macros that plot
  114   various distributions and correlations of the input data, the MVA
  115   method output distributions and the performance comparison plot
  116   (background rejection versus efficiency). It can be used once the
  117   training is run, and is started with
  118 
  119   > root TMVAGui.C
  120 
  121   or
  122 
  123   > root TMVA\(\"MyTMVA.root\"\)
  124 
  125   in case you had directed your training output to a different root
  126   file (2nd argument of the TMVA::Factory constructor)
  127