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 52 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 117 of file RBatchGenerator.hxx.
|
inline |
Definition at line 194 of file RBatchGenerator.hxx.
|
inline |
Activate the loading process by spawning the loading thread.
Definition at line 217 of file RBatchGenerator.hxx.
|
inline |
Activate the training epoch by starting the batchloader.
Definition at line 235 of file RBatchGenerator.hxx.
|
inline |
Definition at line 259 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 398 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 420 of file RBatchGenerator.hxx.
|
inline |
Definition at line 196 of file RBatchGenerator.hxx.
|
inline |
Definition at line 247 of file RBatchGenerator.hxx.
|
inline |
Definition at line 271 of file RBatchGenerator.hxx.
|
inline |
Loads a training batch from the queue.
Definition at line 443 of file RBatchGenerator.hxx.
|
inline |
Loads a validation batch from the queue.
Definition at line 450 of file RBatchGenerator.hxx.
|
inline |
Definition at line 462 of file RBatchGenerator.hxx.
|
inline |
Definition at line 468 of file RBatchGenerator.hxx.
|
inline |
Definition at line 474 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 286 of file RBatchGenerator.hxx.
|
inline |
Definition at line 456 of file RBatchGenerator.hxx.
|
inline |
Definition at line 457 of file RBatchGenerator.hxx.
|
inline |
Definition at line 459 of file RBatchGenerator.hxx.
|
inline |
Definition at line 460 of file RBatchGenerator.hxx.
|
private |
Definition at line 58 of file RBatchGenerator.hxx.
|
private |
Definition at line 59 of file RBatchGenerator.hxx.
|
private |
Definition at line 65 of file RBatchGenerator.hxx.
|
private |
Definition at line 56 of file RBatchGenerator.hxx.
|
private |
Definition at line 54 of file RBatchGenerator.hxx.
|
private |
Definition at line 64 of file RBatchGenerator.hxx.
|
private |
Definition at line 82 of file RBatchGenerator.hxx.
|
private |
Definition at line 92 of file RBatchGenerator.hxx.
|
private |
Definition at line 89 of file RBatchGenerator.hxx.
|
private |
Definition at line 84 of file RBatchGenerator.hxx.
|
private |
Definition at line 76 of file RBatchGenerator.hxx.
|
private |
Definition at line 77 of file RBatchGenerator.hxx.
|
private |
Definition at line 75 of file RBatchGenerator.hxx.
|
private |
Definition at line 57 of file RBatchGenerator.hxx.
|
private |
Definition at line 99 of file RBatchGenerator.hxx.
|
private |
Definition at line 96 of file RBatchGenerator.hxx.
|
private |
Definition at line 100 of file RBatchGenerator.hxx.
|
private |
Definition at line 97 of file RBatchGenerator.hxx.
|
private |
Definition at line 73 of file RBatchGenerator.hxx.
|
private |
Definition at line 87 of file RBatchGenerator.hxx.
|
private |
Definition at line 109 of file RBatchGenerator.hxx.
|
private |
Definition at line 110 of file RBatchGenerator.hxx.
|
private |
Definition at line 86 of file RBatchGenerator.hxx.
|
private |
Definition at line 85 of file RBatchGenerator.hxx.
|
private |
Definition at line 60 of file RBatchGenerator.hxx.
|
private |
Definition at line 83 of file RBatchGenerator.hxx.
|
private |
Definition at line 71 of file RBatchGenerator.hxx.
|
private |
Definition at line 112 of file RBatchGenerator.hxx.
|
private |
Definition at line 66 of file RBatchGenerator.hxx.
|
private |
Definition at line 79 of file RBatchGenerator.hxx.
|
private |
Definition at line 106 of file RBatchGenerator.hxx.
|
private |
Definition at line 103 of file RBatchGenerator.hxx.
|
private |
Definition at line 93 of file RBatchGenerator.hxx.
|
private |
Definition at line 68 of file RBatchGenerator.hxx.
|
private |
Definition at line 90 of file RBatchGenerator.hxx.
|
private |
Definition at line 67 of file RBatchGenerator.hxx.
|
private |
Definition at line 80 of file RBatchGenerator.hxx.
|
private |
Definition at line 114 of file RBatchGenerator.hxx.
|
private |
Definition at line 107 of file RBatchGenerator.hxx.
|
private |
Definition at line 104 of file RBatchGenerator.hxx.
|
private |
Definition at line 94 of file RBatchGenerator.hxx.
|
private |
Definition at line 69 of file RBatchGenerator.hxx.
|
private |
Definition at line 62 of file RBatchGenerator.hxx.
|
private |
Definition at line 55 of file RBatchGenerator.hxx.