import ROOT
tree_name = "test_tree"
file_name = (
+ "/machine_learning/RBatchGenerator_filters_vectors_hvector.root"
)
chunk_size = 50
batch_size = 5
.Filter("f2 < 70", "second_filter")\
.Filter("f3==true", "third_filter")
max_vec_sizes = {"f4": 3, "f5": 2, "f6": 1}
filteredrdf,
batch_size,
chunk_size,
validation_split=0.3,
max_vec_sizes=max_vec_sizes,
shuffle=True,
)
print(f"Columns: {ds_train.columns}")
print(f"Training batch {i} => {b.shape}")
print(f"Validation batch {i} => {b.shape}")
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
Columns: ['f1', 'f2', 'f3', 'f4_0', 'f4_1', 'f4_2', 'f5_0', 'f5_1', 'f6_0']
Training batch 0 => (5, 9)
Training batch 1 => (5, 9)
Validation batch 0 => (5, 9)
- Author
- Dante Niewenhuis
Definition in file RBatchGenerator_filters_vectors.py.