61 "!V:ROC:!Silent:Color:AnalysisType=Classification" );
80 Error(
"TMVA_Higgs_Classification",
"Input file is not found - exit");
103 loader->AddVariable(
"m_jj");
104 loader->AddVariable(
"m_jjj");
105 loader->AddVariable(
"m_lv");
106 loader->AddVariable(
"m_jlv");
107 loader->AddVariable(
"m_bb");
108 loader->AddVariable(
"m_wbb");
109 loader->AddVariable(
"m_wwbb");
139 "nTrain_Signal=7000:nTrain_Background=7000:SplitMode=Random:NormMode=NumEvents:!V" );
153 "H:!V:TransformOutput:PDFInterpol=Spline2:NSmoothSig[0]=20:NSmoothBkg[0]=20:NSmoothBkg[1]=10:NSmooth=1:NAvEvtPerBin=50" );
158 "!H:!V:!TransformOutput:PDFInterpol=KDE:KDEtype=Gauss:KDEiter=Adaptive:KDEFineFactor=0.3:KDEborder=None:NAvEvtPerBin=50" );
164 factory.BookMethod(
loader,
TMVA::Types::kFisher,
"Fisher",
"H:!V:Fisher:VarTransform=None:CreateMVAPdfs:PDFInterpolMVAPdf=Spline2:NbinsMVAPdf=50:NsmoothMVAPdf=10" );
170 "!V:NTrees=200:MinNodeSize=2.5%:MaxDepth=2:BoostType=AdaBoost:AdaBoostBeta=0.5:UseBaggedBoost:BaggedSampleFraction=0.5:SeparationType=GiniIndex:nCuts=20" );
176 "!H:!V:NeuronType=tanh:VarTransform=N:NCycles=100:HiddenLayers=N+5:TestRate=5:!UseRegulator" );
254 TString layoutString (
"Layout=DENSE|64|TANH,DENSE|64|TANH,DENSE|64|TANH,DENSE|64|TANH,DENSE|1|LINEAR");
258 "ConvergenceSteps=10,BatchSize=128,TestRepetitions=1,"
259 "MaxEpochs=30,WeightDecay=1e-4,Regularization=None,"
260 "Optimizer=ADAM,ADAM_beta1=0.9,ADAM_beta2=0.999,ADAM_eps=1.E-7,"
261 "DropConfig=0.0+0.0+0.0+0.");
273 "WeightInitialization=XAVIER");
293 Info(
"TMVA_Higgs_Classification",
"Building deep neural network with keras ");
297 m.AddLine(
"import tensorflow");
298 m.AddLine(
"from tensorflow.keras.models import Sequential");
299 m.AddLine(
"from tensorflow.keras.optimizers import Adam");
300 m.AddLine(
"from tensorflow.keras.layers import Input, Dense");
302 m.AddLine(
"model = Sequential() ");
303 m.AddLine(
"model.add(Dense(64, activation='relu',input_dim=7))");
304 m.AddLine(
"model.add(Dense(64, activation='relu'))");
305 m.AddLine(
"model.add(Dense(64, activation='relu'))");
306 m.AddLine(
"model.add(Dense(64, activation='relu'))");
307 m.AddLine(
"model.add(Dense(2, activation='sigmoid'))");
308 m.AddLine(
"model.compile(loss = 'binary_crossentropy', optimizer = Adam(learning_rate = 0.001), weighted_metrics = ['accuracy'])");
309 m.AddLine(
"model.save('Higgs_model.h5')");
310 m.AddLine(
"model.summary()");
312 m.SaveSource(
"make_higgs_model.py");
319 Warning(
"TMVA_Higgs_Classification",
"Error creating Keras model file - skip using Keras");
322 Info(
"TMVA_Higgs_Classification",
"Booking tf.Keras Dense model");
325 "H:!V:VarTransform=None:FilenameModel=Higgs_model.h5:tf.keras:"
326 "FilenameTrainedModel=Higgs_trained_model.h5:NumEpochs=20:BatchSize=100:"
327 "GpuOptions=allow_growth=True");
338 factory.TrainAllMethods();
346 factory.TestAllMethods();
348 factory.EvaluateAllMethods();
352 auto c1 = factory.GetROCCurve(
loader);
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
R__EXTERN TSystem * gSystem
A specialized string object used for TTree selections.
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
This is the main MVA steering class.
static void PyInitialize()
Initialize Python interpreter.
Class supporting a collection of lines with C++ code.
virtual Int_t Exec(const char *shellcmd)
Execute a command.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual void Setenv(const char *name, const char *value)
Set environment variable.
A TTree represents a columnar dataset.