Definition at line 36 of file RBatchGenerator.hxx.
Public Member Functions | |
RBatchGenerator (ROOT::RDF::RNode &rdf, const std::size_t chunkSize, const std::size_t batchSize, const std::vector< std::string > &cols, const std::size_t numColumns, 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) | |
~RBatchGenerator () | |
void | Activate () |
Activate the loading process by starting the batchloader, and spawning the loading thread. | |
void | CreateBatches (std::size_t processedEvents) |
Create batches. | |
std::pair< std::vector< std::size_t >, std::vector< std::size_t > > | createIndices (std::size_t events) |
split the events of the current chunk into training and validation events, shuffle if needed | |
void | DeActivate () |
De-activate the loading process by deactivating the batchgenerator and joining the loading thread. | |
const TMVA::Experimental::RTensor< float > & | GetTrainBatch () |
Returns the next batch of training data if available. | |
const TMVA::Experimental::RTensor< float > & | GetValidationBatch () |
Returns the next batch of validation data if available. | |
bool | IsActive () |
void | LoadChunksFilters () |
void | LoadChunksNoFilters () |
Load chunks when no filters are applied on rdataframe. | |
std::size_t | NumberOfTrainingBatches () |
std::size_t | NumberOfValidationBatches () |
Calculate number of validation batches and return it. | |
std::size_t | TrainRemainderRows () |
Return number of training remainder rows. | |
std::size_t | ValidationRemainderRows () |
Return number of validation remainder rows. | |
Private Attributes | |
ROOT::RDF::RNode & | f_rdf |
std::unique_ptr< RBatchLoader > | fBatchLoader |
std::size_t | fBatchSize |
std::variant< std::shared_ptr< RChunkLoader< Args... > >, std::shared_ptr< RChunkLoaderFilters< Args... > > > | fChunkLoader |
std::size_t | fChunkSize |
std::unique_ptr< TMVA::Experimental::RTensor< float > > | fChunkTensor |
bool | fDropRemainder |
std::mt19937 | fFixedRng |
std::random_device::result_type | fFixedSeed |
bool | fIsActive {false} |
std::mutex | fIsActiveMutex |
std::unique_ptr< std::thread > | fLoadingThread |
std::size_t | fMaxChunks |
bool | fNotFiltered |
std::size_t | fNumEntries |
std::mt19937 | fRng |
bool | fShuffle |
bool | fUseWholeFile |
float | fValidationSplit |
#include <TMVA/BatchGenerator/RBatchGenerator.hxx>
|
inline |
Definition at line 68 of file RBatchGenerator.hxx.
|
inline |
Definition at line 111 of file RBatchGenerator.hxx.
|
inline |
Activate the loading process by starting the batchloader, and spawning the loading thread.
Definition at line 133 of file RBatchGenerator.hxx.
|
inline |
|
inline |
split the events of the current chunk into training and validation events, shuffle if needed
events |
Definition at line 302 of file RBatchGenerator.hxx.
|
inline |
De-activate the loading process by deactivating the batchgenerator and joining the loading thread.
Definition at line 115 of file RBatchGenerator.hxx.
|
inline |
Returns the next batch of training data if available.
Returns empty RTensor otherwise.
Definition at line 156 of file RBatchGenerator.hxx.
|
inline |
Returns the next batch of validation data if available.
Returns empty RTensor otherwise.
Definition at line 165 of file RBatchGenerator.hxx.
|
inline |
Definition at line 329 of file RBatchGenerator.hxx.
|
inline |
Definition at line 256 of file RBatchGenerator.hxx.
|
inline |
Load chunks when no filters are applied on rdataframe.
Definition at line 230 of file RBatchGenerator.hxx.
|
inline |
Definition at line 171 of file RBatchGenerator.hxx.
|
inline |
Calculate number of validation batches and return it.
Definition at line 201 of file RBatchGenerator.hxx.
|
inline |
Return number of training remainder rows.
Definition at line 186 of file RBatchGenerator.hxx.
|
inline |
Return number of validation remainder rows.
Definition at line 216 of file RBatchGenerator.hxx.
|
private |
Definition at line 57 of file RBatchGenerator.hxx.
|
private |
Definition at line 51 of file RBatchGenerator.hxx.
|
private |
Definition at line 44 of file RBatchGenerator.hxx.
|
private |
Definition at line 49 of file RBatchGenerator.hxx.
|
private |
Definition at line 42 of file RBatchGenerator.hxx.
|
private |
Definition at line 55 of file RBatchGenerator.hxx.
|
private |
Definition at line 61 of file RBatchGenerator.hxx.
|
private |
Definition at line 39 of file RBatchGenerator.hxx.
|
private |
Definition at line 40 of file RBatchGenerator.hxx.
|
private |
Definition at line 63 of file RBatchGenerator.hxx.
|
private |
Definition at line 59 of file RBatchGenerator.hxx.
|
private |
Definition at line 53 of file RBatchGenerator.hxx.
|
private |
Definition at line 43 of file RBatchGenerator.hxx.
|
private |
Definition at line 64 of file RBatchGenerator.hxx.
|
private |
Definition at line 45 of file RBatchGenerator.hxx.
|
private |
Definition at line 38 of file RBatchGenerator.hxx.
|
private |
Definition at line 62 of file RBatchGenerator.hxx.
|
private |
Definition at line 65 of file RBatchGenerator.hxx.
|
private |
Definition at line 47 of file RBatchGenerator.hxx.