TMVA tricks

  •  root_5_28 and TMVA_4_1_2 : 
  1. do not forget to source setup.sh in /test directory
  2. before running TMVA, always source. Apparently a macro used to plots the efficiencies (mvaEff.C) is not found then TMVAgui.C crashes: 

 

  dlopen error: dlopen(/Users/bouchet/Desktop/TMVA_4_1_2/TMVA-v4.1.2/test/./mvaeffs_C.so, 9): Library not loaded: lib/libTMVA.dylib

  Referenced from: /Users/bouchet/Desktop/TMVA_4_1_2/TMVA-v4.1.2/test/./mvaeffs_C.so

  Reason: image not found

  Load Error: Failed to load Dynamic link library /Users/bouchet/Desktop/TMVA_4_1_2/TMVA-v4.1.2/test/./mvaeffs_C.so
According to TMVAuser guide, it could be due to the fact that libTMVA.1.so is not properly linked because TMVA package already exist in root_5_28 

  

  • gdb with root  and TMVA
> gdb root.exe

>run TMVAClassificationApplication.C\(\"Cuts,CutsD,CutsPCA,Likelihood,LikelihoodD,LikelihoodPCA,LD,Fisher,FisherG,BoostedFisher\"\)

 

  •  user classifier

When using a modified classifier [i.e with modified parameter], for training (in TMVAClassification.C)

 

 if (Use["myBDT4"])  // Adaptive Boost

     factory->BookMethod( TMVA::Types::kBDT, "BDTcombo",
     "!H:!V:NTrees=2000:nEventsMin=150:MaxDepth=7:BoostType=AdaBoost:AdaBoostBeta=0.5:SeparationType=GiniIndex:nCuts=20:PruneMethod=CostComplexity:PruneStrength=-1" );

 to run the training :  

dh14:test bouchet$ root -l TMVAClassification.C\(\"Likelihood,Fisher,BDT,MLP,myBDT4\"\)

 

For reading the classifier, be careful with the name (in TMVAClassificationApplication.C) :

add the line :

Use["BDTcombo"]         = 1; // uses Adaptive Boost

to run the macro :

dh14:test bouchet$ root -l TMVAClassificationApplication.C\(\"Likelihood,Fisher,BDT,MLP,BDTcombo\"\)
  •  summary of classiffiers performances : here