This tutorial shows how to do classification in TMVA with neural networks trained with keras.
from ROOT import TMVA, TFile, TTree, TCut, gROOT
from subprocess import call
output =
TFile.Open(
'TMVA_Classification_Keras.root',
'RECREATE')
'!V:!Silent:Color:DrawProgressBar:Transformations=D,G:AnalysisType=Classification')
'nTrain_Signal=4000:nTrain_Background=4000:SplitMode=Random:NormMode=NumEvents:!V')
optimizer=
SGD(learning_rate=0.01), weighted_metrics=[
'accuracy', ])
'!H:!V:Fisher:VarTransform=D,G')
'H:!V:VarTransform=D,G:FilenameModel=modelClassification.h5:FilenameTrainedModel=trainedModelClassification.h5:NumEpochs=20:BatchSize=32')
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
A specialized string object used for TTree selections.
This is the main MVA steering class.
- Date
- 2017
- Author
- TMVA Team
Definition in file ClassificationKeras.py.