Specify the number of entries for a category in kCategory

Dear ROOT experts,

I am using the kCategory method for my training. Since I have a large sample I do not want all my events to be used for the training so I tried passing in the dataloader something like the following:

"nTrain_Signal=80000:nTrain_Background=120000:nTest_Signal=80000:nTest_Background=120000"

but it fails. The reason is that I do not have the same number of events in every category and some of them have less than the number specified. Lowering the number of events makes the program work but I have noticed the following behavior. The number of events I pass in the dataloader options is used as the total number of events and not the number of events in every category.

In the above example the number 80000 for the signal will be used as the sum of events for events of all the Categories but the dataloader checks that every single category contains 80000 events. I was wondering if this behavior is expected and moreover if there is a way to specify the number of events in every category.

Thank you in advance,
Ioannis

Hi,

If you could provide some more details, that would be great! In particular: How are you categories set up, and what is the failure mode? Is there an error message? Also, what is the reason you are using MethodCategory?

Yes, this is how MethodCategory works. The categories use a subset of the data in the dataloader (using either a subset of events, variables or both).

Here I don’t think I understand. When does the dataloader do this? (Error message would be helpful!)

Cheers,
Kim