Batch Generator using RDataframe

Hi,

I’ve saw in a post from last year about a batch generator for RDataframe. I’m wondering if this feature is available in the last root version.

If not, there is a practical way to get specific rows from a RDF given their indexes?

Thanks!

Dear Micael,

The RBatchGenerator is available in experimental mode in the ROOT releases of the 6.30 series. You can see an example usage here: ROOT: tutorials/tmva/RBatchGenerator_PyTorch.py File Reference

I hope this helps.

Cheers,
D

Thanks Danilo!!

Cheers
Micael

@Danilo,

do you know if it’s possible to integrate this with StratifiedKFold? I want to create a cross-validation process with some folds and them train the models.

Dear Micael,

I add in the loop the ML expert of the CERN SFT group, @moneta

Best,
D

Thanks @Danilo!

I want something like this: sklearn.model_selection.StratifiedKFold — scikit-learn 1.4.1 documentation

I need to generate the folds and then use each fold to create the generator for training.

Thanks in advance,
Micael

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.