11#ifndef TMVA_RDATASETLOADER
12#define TMVA_RDATASETLOADER
27namespace Experimental {
102template <
typename... Args>
133 const std::vector<std::string> &
cols,
const std::vector<std::size_t> &
vecSizes = {},
157 std::size_t NumEntries =
rdf.Count().GetValue();
177 for (std::size_t
j = 0;
j < NumEntries;
j++) {
unsigned long long ULong64_t
Portable unsigned long integer 8 bytes.
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
The public interface to the RDataFrame federation of classes.
Smart pointer for the return type of actions.
void AssignToTensor(const T &val, int i, int numColumns)
Copy the content of a column into RTensor when the column consits of single values.
RDatasetLoaderFunctor(RFlat2DMatrix &datasetTensor, std::size_t numColumns, const std::vector< std::size_t > &maxVecSizes, float vecPadding, int i)
std::vector< std::size_t > fMaxVecSizes
RFlat2DMatrix & fDatasetTensor
std::size_t fNumDatasetCols
void operator()(const ColTypes &...cols)
void AssignToTensor(const T &vec, int i, int numColumns)
Copy the content of a column into RTensor when the column consits of vectors.
std::vector< RFlat2DMatrix > GetValidationDatasets()
std::vector< std::size_t > fVecSizes
std::size_t fNumTrainingEntries
std::unique_ptr< RFlat2DMatrixOperators > fTensorOperators
std::vector< RFlat2DMatrix > GetTrainingDatasets()
std::vector< ROOT::RDF::RNode > f_rdfs
std::size_t fNumValidationEntries
ROOT::RDF::RResultPtr< std::vector< ULong64_t > > fEntries
void SplitDatasets()
Split the dataframes in a training and validation dataset.
std::vector< RFlat2DMatrix > fValidationDatasets
std::vector< RFlat2DMatrix > fTrainingDatasets
std::size_t fNumDatasetCols
std::vector< std::string > fCols
void SplitDataframe(ROOT::RDF::RNode &rdf, RFlat2DMatrix &TrainingDataset, RFlat2DMatrix &ValidationDataset)
Split an individual dataframe into a training and validation dataset.
RDatasetLoader(const std::vector< ROOT::RDF::RNode > &rdfs, const float validationSplit, const std::vector< std::string > &cols, const std::vector< std::size_t > &vecSizes={}, const float vecPadding=0.0, bool shuffle=true, const std::size_t setSeed=0)
void ChangeBeginAndEndEntries(const RNode &node, Long64_t begin, Long64_t end)
create variable transformations
Wrapper around ROOT::RVec<float> representing a 2D matrix.