Unbalanced data TMVA

Dear TMVA users,

Does TMVA have a system to manage unbalanced data for training ML models, like BDT or DNN for example? If it does, is it automatic or do I have to specify a command?

Thanks in advance.
Regards.

Hi,

See the TMVA Users’ guide p. 21-22. The setting you are looking for is called NormMode for the Dataloader::PrepareTrainingAndTestTree.

The default balances the weights of all classes to be equal (with an average weight per signal event of 1).

Cheers,
Kim

Thanks for the answer.

Will I be able to do this if I’m using event-by-event weights with dataloader->SetBackgroundWeightExpression( “weight” )?

Hi,

Yes!

The events are normalised event-by-event. In the default case I think the signal class is normalised to have an average event weight of 1, and the other classes are then normalised to have the same weighted sum as signal. This retains the relative weight ratio within classes.

Cheers,
Kim

I understand now. Thank you very much for your help!