Home | News | Documentation | Download

TMVA Classification

Hi everyone,

I wanted to something about the TMVA classification. According to this wiki:

I need to get a weights file as an output, after the TMVA training (e.g TMVAClassification.weights.xml). However, I don’t get any xml file or something like that, and this file is not defined anywhere in the classification example code. I only get the root output (which they called in this wiki outfileName). Does anyone know, by any chance, how to get the weights file?


@moneta Perhaps you can advise?

Which method are you using for classification ? It is possible that for some methods the weight file is not written. If you are using code similar to this macro,

the weight file should be written in the dataset/weights directory



Thank you for your answer, Lorenzo.
My code is indeed based on the TMVAClassification.C code. The problem is that even when I run this exmaple code, I don’t get this weight directory. This is the content of my dataset directory in the output root file:

TDirectoryFile* dataset dataset
KEY: TH2F CorrelationMatrixS;1 Correlation Matrix (signal)
KEY: TH2F CorrelationMatrixB;1 Correlation Matrix (background)
KEY: TDirectoryFile InputVariables_Id;1 InputVariables_Id
KEY: TDirectoryFile InputVariables_Deco;1 InputVariables_Deco
KEY: TDirectoryFile InputVariables_PCA;1 InputVariables_PCA
KEY: TDirectoryFile InputVariables_Gauss_Deco;1 InputVariables_Gauss_Deco
KEY: TDirectoryFile Method_Cuts;1 Directory for all Cuts methods
KEY: TDirectoryFile Method_CutsD;1 Directory for all Cuts methods
KEY: TDirectoryFile Method_Likelihood;1 Directory for all Likelihood methods
KEY: TDirectoryFile Method_LikelihoodPCA;1 Directory for all Likelihood methods
KEY: TDirectoryFile Method_PDERS;1 Directory for all PDERS methods
KEY: TDirectoryFile Method_PDEFoam;1 Directory for all PDEFoam methods
KEY: TDirectoryFile Method_KNN;1 Directory for all KNN methods
KEY: TDirectoryFile Method_LD;1 Directory for all LD methods
KEY: TDirectoryFile Method_FDA_GA;1 Directory for all FDA methods
KEY: TDirectoryFile Method_MLPBNN;1 Directory for all MLP methods
KEY: TDirectoryFile Method_SVM;1 Directory for all SVM methods
KEY: TDirectoryFile Method_BDT;1 Directory for all BDT methods
KEY: TDirectoryFile Method_RuleFit;1 Directory for all RuleFit methods
KEY: TTree TestTree;1 TestTree
KEY: TTree TrainTree;1 TrainTree

Never mind, my bad, it was solved. I got confused between dataset directory in the root file, and the dataset directory of the external directory. Thanks a lot!