[TMVA - MLP] How to export weight class in python?

Hi,

I would like to ask if anyone know a method to export the neural network weight class in python instead of C++ ? By default, TMVA exports all the computed weight in .xml and with a C++ class in a folder called “weight/”. Here is a little piece of code that generate the “weight/” folder with files :

method = factory.BookMethod(ROOT.TMVA.Types.kMLP, "MLP", "H:!V:NeuronType=tanh:VarTransform=N:NCycles=600:HiddenLayers=N+5:TestRate=5" )
factory.TrainAllMethods()
factory.TestAllMethods()
factory.EvaluateAllMethods()

Do anyone know how to generate a .py class in the weight/ folder ?

Thanks in advance,
Adrien

Hi Adrien,

We currently don’t support that feature, but can add it if that would be useful.

Cheers,

Sergei

Thanks for your answer,

I think the feature could be useful, because using pyroot can save a lot of time for coding. I don’t know if it’s possible but if the output files could be controlled explicitly by the user, that would be cool !

Cheers,
Adrien