Dear experts,
So I was trying to train several neural networks at once, but it seems that after training the first one (MLP_10) on around 39k events, all the next ones (MLP_11…MLP_20) are trained on only 3.9k events. I attach a screenshot of a training log. Regarding the code, I add training and testing events one by one after the selection process:
if(isigA == 0 )
{
if( aTrainOption )
{
aTmvaFactory ->AddSignalTrainingEvent( m_TmvaTrainDVars, GetWeight());
}
else
{
aTmvaFactory ->AddSignalTestEvent( m_TmvaTrainDVars, GetWeight());
}
}
else
{
if( aTrainOption )
{
aTmvaFactory ->AddBackgroundTrainingEvent( m_TmvaTrainDVars, aLBG-> NominalBackgrEventWeight());
}
else
{
aTmvaFactory ->AddBackgroundTestEvent( m_TmvaTrainDVars, aLBG-> NominalBackgrEventWeight());
}
}
(weights are equal to one in this case)
and prepare the trees using:
aTmvaFactory->PrepareTrainingAndTestTree( cuts,"nTrain_Signal=0:nTrain_Background=0:nTest_Signal=0:nTest_Background=0:SplitMode=Random:NormMode=NumEvents:V" );
the MLP’s are booked in a for loop:
for (int i = 0; i<10; ++i)
{
number += i;
aTmvaFactory->BookMethod(TMVA::Types::kMLP,"MLP_1"+number,"!H:!V:ConvergenceImprove=1e-4:ConvergenceTests=20:TestRate=5:Sampling=0.1:SamplingEpoch=100:SamplingImportance=2:Tau=3:HiddenLayers=60,40:VarTransform= G,D,G,Norm:NCycles= 300 :NeuronType= sigmoid:TrainingMethod=BFGS :UseRegulator=False:EstimatorType=MSE:RandomSeed=0");
number="";
}
Can you help me with increasing the number of events for other MLP’s?