I’m training a BDT and a DNN with real data and some Monte Carlo simulated data. As real data has weight equal to 1, and simulated data has weights bigger or smaller than 1, I was wondering how could I include this weights into the model trainings. For BDT I could take them in as weights for the trees, or as initial weights for each event? And for DNN, could the weights be incorporated as initial weights too?
TMVA provides support for both DNN and BDT of single event weights. You need just to call the function DataLoader::SetSignalWeightExpression for the signal tree and DataLoader::SetBackgroundWeightExpression for the background tree. You can see example in the tutorial, ``TMVAClassification.C` https://root.cern.ch/doc/master/TMVAClassification_8C.html