15#ifndef TMVA_RBATCHGENERATOR
16#define TMVA_RBATCHGENERATOR
37namespace Experimental {
49template <
typename... Args>
72 std::vector<ROOT::RDF::RNode>
f_rdfs;
119 const std::size_t batchSize,
const std::vector<std::string> &
cols,
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Building and loading the chunks from the blocks and chunks constructed in RChunkConstructor.
bool fValidationEpochActive
void ActivateTrainingEpoch()
std::size_t ValidationRemainderRows()
std::unique_ptr< RFlat2DMatrixOperators > fTensorOperators
std::size_t TrainRemainderRows()
std::size_t fValidationChunkNum
RFlat2DMatrix fTrainTensor
std::size_t fNumValidationChunks
std::size_t fNumTrainingEntries
std::unique_ptr< std::thread > fLoadingThread
std::size_t NumberOfTrainingBatches()
std::unique_ptr< RBatchLoader > fTrainingBatchLoader
std::size_t fNumValidationEntries
std::size_t fTrainingChunkNum
void Activate()
Activate the loading process by starting the batchloader, and spawning the loading thread.
std::size_t NumberOfValidationBatches()
RFlat2DMatrix fSampledValidationDataset
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)
void CreateValidationBatches()
Creates validation batches by first loading a chunk (see RChunkLoader), and then split it into batche...
RFlat2DMatrix fTrainingDataset
RFlat2DMatrix fValidationDataset
RFlat2DMatrix fValidationTensor
std::vector< std::string > fCols
std::unique_ptr< RSampler > fTrainingSampler
void CreateTrainBatches()
Create training batches by first loading a chunk (see RChunkLoader) and split it into batches (see RB...
void DeActivateValidationEpoch()
RFlat2DMatrix fSampledTrainingDataset
std::unique_ptr< RDatasetLoader< Args... > > fDatasetLoader
RFlat2DMatrix GetValidationBatch()
Loads a validation batch from the queue.
std::vector< ROOT::RDF::RNode > f_rdfs
void DeActivateTrainingEpoch()
std::unique_ptr< RChunkLoader< Args... > > fChunkLoader
std::size_t fNumTrainingChunks
RFlat2DMatrix fValidationChunkTensor
std::mutex fIsActiveMutex
std::vector< RFlat2DMatrix > fTrainingDatasets
std::vector< std::size_t > fVecSizes
std::unique_ptr< RBatchLoader > fValidationBatchLoader
RFlat2DMatrix GetTrainBatch()
Loads a training batch from the queue.
bool fTrainingEpochActive
RFlat2DMatrix fTrainChunkTensor
std::unique_ptr< RSampler > fValidationSampler
std::vector< RFlat2DMatrix > fValidationDatasets
void ActivateValidationEpoch()
void SplitDatasets()
Split the dataframes in a training and validation dataset.
create variable transformations
Wrapper around ROOT::RVec<float> representing a 2D matrix.