In this class, the processes of loading chunks (see RChunkLoader) and creating batches from those chunks (see RBatchLoader) are combined, allowing batches from the training and validation sets to be loaded directly from a dataset in an RDataFrame.
Definition at line 49 of file RBatchGenerator.hxx.
Public Member Functions | |
| RBatchGenerator (const std::vector< ROOT::RDF::RNode > &rdfs, const std::size_t chunkSize, const std::size_t blockSize, const std::size_t batchSize, const std::vector< std::string > &cols, const std::vector< std::size_t > &vecSizes={}, const float vecPadding=0.0, const float validationSplit=0.0, const std::size_t maxChunks=0, bool shuffle=true, bool dropRemainder=true, const std::size_t setSeed=0, bool loadEager=false, std::string sampleType="", float sampleRatio=1.0, bool replacement=false) | |
| ~RBatchGenerator () | |
| void | Activate () |
| Activate the loading process by spawning the loading thread. | |
| void | ActivateTrainingEpoch () |
| Activate the training epoch by starting the batchloader. | |
| void | ActivateValidationEpoch () |
| void | CreateTrainBatches () |
| Create training batches by first loading a chunk (see RChunkLoader) and split it into batches (see RBatchLoader) | |
| void | CreateValidationBatches () |
| Creates validation batches by first loading a chunk (see RChunkLoader), and then split it into batches (see RBatchLoader) | |
| void | DeActivate () |
| void | DeActivateTrainingEpoch () |
| void | DeActivateValidationEpoch () |
| RFlat2DMatrix | GetTrainBatch () |
| Loads a training batch from the queue. | |
| RFlat2DMatrix | GetValidationBatch () |
| Loads a validation batch from the queue. | |
| bool | IsActive () |
| bool | IsTrainingActive () |
| bool | IsValidationActive () |
| void | LoadChunks () |
| Main loop for loading chunks and creating batches. | |
| std::size_t | NumberOfTrainingBatches () |
| std::size_t | NumberOfValidationBatches () |
| std::size_t | TrainRemainderRows () |
| std::size_t | ValidationRemainderRows () |
#include <ROOT/ML/RBatchGenerator.hxx>
|
inline |
Definition at line 114 of file RBatchGenerator.hxx.
|
inline |
Definition at line 191 of file RBatchGenerator.hxx.
|
inline |
Activate the loading process by spawning the loading thread.
Definition at line 214 of file RBatchGenerator.hxx.
|
inline |
Activate the training epoch by starting the batchloader.
Definition at line 232 of file RBatchGenerator.hxx.
|
inline |
Definition at line 256 of file RBatchGenerator.hxx.
|
inline |
Create training batches by first loading a chunk (see RChunkLoader) and split it into batches (see RBatchLoader)
Definition at line 395 of file RBatchGenerator.hxx.
|
inline |
Creates validation batches by first loading a chunk (see RChunkLoader), and then split it into batches (see RBatchLoader)
Definition at line 417 of file RBatchGenerator.hxx.
|
inline |
Definition at line 193 of file RBatchGenerator.hxx.
|
inline |
Definition at line 244 of file RBatchGenerator.hxx.
|
inline |
Definition at line 268 of file RBatchGenerator.hxx.
|
inline |
Loads a training batch from the queue.
Definition at line 440 of file RBatchGenerator.hxx.
|
inline |
Loads a validation batch from the queue.
Definition at line 447 of file RBatchGenerator.hxx.
|
inline |
Definition at line 459 of file RBatchGenerator.hxx.
|
inline |
Definition at line 465 of file RBatchGenerator.hxx.
|
inline |
Definition at line 471 of file RBatchGenerator.hxx.
|
inline |
Main loop for loading chunks and creating batches.
The producer (loading thread) will keep loading chunks and creating batches until the end of the epoch is reached, or the generator is deactivated.
Definition at line 283 of file RBatchGenerator.hxx.
|
inline |
Definition at line 453 of file RBatchGenerator.hxx.
|
inline |
Definition at line 454 of file RBatchGenerator.hxx.
|
inline |
Definition at line 456 of file RBatchGenerator.hxx.
|
inline |
Definition at line 457 of file RBatchGenerator.hxx.
|
private |
Definition at line 55 of file RBatchGenerator.hxx.
|
private |
Definition at line 56 of file RBatchGenerator.hxx.
|
private |
Definition at line 62 of file RBatchGenerator.hxx.
|
private |
Definition at line 53 of file RBatchGenerator.hxx.
|
private |
Definition at line 51 of file RBatchGenerator.hxx.
|
private |
Definition at line 61 of file RBatchGenerator.hxx.
|
private |
Definition at line 79 of file RBatchGenerator.hxx.
|
private |
Definition at line 89 of file RBatchGenerator.hxx.
|
private |
Definition at line 86 of file RBatchGenerator.hxx.
|
private |
Definition at line 81 of file RBatchGenerator.hxx.
|
private |
Definition at line 73 of file RBatchGenerator.hxx.
|
private |
Definition at line 74 of file RBatchGenerator.hxx.
|
private |
Definition at line 72 of file RBatchGenerator.hxx.
|
private |
Definition at line 54 of file RBatchGenerator.hxx.
|
private |
Definition at line 96 of file RBatchGenerator.hxx.
|
private |
Definition at line 93 of file RBatchGenerator.hxx.
|
private |
Definition at line 97 of file RBatchGenerator.hxx.
|
private |
Definition at line 94 of file RBatchGenerator.hxx.
|
private |
Definition at line 70 of file RBatchGenerator.hxx.
|
private |
Definition at line 84 of file RBatchGenerator.hxx.
|
private |
Definition at line 106 of file RBatchGenerator.hxx.
|
private |
Definition at line 107 of file RBatchGenerator.hxx.
|
private |
Definition at line 83 of file RBatchGenerator.hxx.
|
private |
Definition at line 82 of file RBatchGenerator.hxx.
|
private |
Definition at line 57 of file RBatchGenerator.hxx.
|
private |
Definition at line 80 of file RBatchGenerator.hxx.
|
private |
Definition at line 68 of file RBatchGenerator.hxx.
|
private |
Definition at line 109 of file RBatchGenerator.hxx.
|
private |
Definition at line 63 of file RBatchGenerator.hxx.
|
private |
Definition at line 76 of file RBatchGenerator.hxx.
|
private |
Definition at line 103 of file RBatchGenerator.hxx.
|
private |
Definition at line 100 of file RBatchGenerator.hxx.
|
private |
Definition at line 90 of file RBatchGenerator.hxx.
|
private |
Definition at line 65 of file RBatchGenerator.hxx.
|
private |
Definition at line 87 of file RBatchGenerator.hxx.
|
private |
Definition at line 64 of file RBatchGenerator.hxx.
|
private |
Definition at line 77 of file RBatchGenerator.hxx.
|
private |
Definition at line 111 of file RBatchGenerator.hxx.
|
private |
Definition at line 104 of file RBatchGenerator.hxx.
|
private |
Definition at line 101 of file RBatchGenerator.hxx.
|
private |
Definition at line 91 of file RBatchGenerator.hxx.
|
private |
Definition at line 66 of file RBatchGenerator.hxx.
|
private |
Definition at line 59 of file RBatchGenerator.hxx.
|
private |
Definition at line 52 of file RBatchGenerator.hxx.