Load the whole dataset into memory.
In this class the whole dataset is loaded into memory. The dataset is further shuffled and spit into training and validation sets with the user-defined validation split fraction.
Definition at line 37 of file RDatasetLoader.hxx.
Public Member Functions | |
| 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) | |
| std::vector< std::size_t > | CountEntries (std::vector< ROOT::RDF::RNode > &rdfs) |
| Number of entries to reserve for each dataframe. | |
| std::size_t | GetNumTrainingEntries () |
| std::size_t | GetNumValidationEntries () |
| void | LoadDataframe (ROOT::RDF::RNode &rdf, std::size_t NumEntries) |
| Load all the entries of an individual dataframe at the end of the dataset. | |
| RFlat2DMatrix | ReleaseDataset () |
| std::vector< std::vector< std::size_t > > | ReleaseTrainingRows () |
| std::vector< std::vector< std::size_t > > | ReleaseValidationRows () |
| void | SplitDatasets (bool concatenate) |
| Load the dataframes into a single dataset and split it in training and validation rows. | |
| void | SplitRows (std::size_t firstRow, std::vector< std::size_t > &TrainingRows, std::vector< std::size_t > &ValidationRows) |
Split the rows of the dataset from firstRow on into training and validation rows. | |
Private Attributes | |
| std::vector< ROOT::RDF::RNode > | f_rdfs |
| std::vector< std::string > | fCols |
| RFlat2DMatrix | fDataset |
| std::size_t | fNumCols |
| std::size_t | fNumDatasetCols |
| std::size_t | fNumTrainingEntries |
| std::size_t | fNumValidationEntries |
| std::size_t | fSetSeed |
| bool | fShuffle |
| std::size_t | fSumVecSizes |
| std::unique_ptr< RFlat2DMatrixOperators > | fTensorOperators |
| std::vector< std::vector< std::size_t > > | fTrainingRows |
| std::vector< std::vector< std::size_t > > | fValidationRows |
| float | fValidationSplit |
| float | fVecPadding |
| std::vector< std::size_t > | fVecSizes |
#include </github/home/ROOT-CI/src/tree/ml/src/RDatasetLoader.hxx>
| ROOT::Experimental::Internal::ML::RDatasetLoader::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 ) |
Definition at line 7 of file RDatasetLoader.cxx.
| std::vector< std::size_t > ROOT::Experimental::Internal::ML::RDatasetLoader::CountEntries | ( | std::vector< ROOT::RDF::RNode > & | rdfs | ) |
Number of entries to reserve for each dataframe.
| [in] | rdfs | Dataframes to load |
Definition at line 29 of file RDatasetLoader.cxx.
|
inline |
Definition at line 82 of file RDatasetLoader.hxx.
|
inline |
Definition at line 83 of file RDatasetLoader.hxx.
| void ROOT::Experimental::Internal::ML::RDatasetLoader::LoadDataframe | ( | ROOT::RDF::RNode & | rdf, |
| std::size_t | NumEntries ) |
Load all the entries of an individual dataframe at the end of the dataset.
| [in] | rdf | Dataframe to load |
| [in] | NumEntries | Number of entries of the dataframe, an upper bound for a filtered dataframe |
Definition at line 67 of file RDatasetLoader.cxx.
|
inline |
Definition at line 77 of file RDatasetLoader.hxx.
|
inline |
Definition at line 79 of file RDatasetLoader.hxx.
|
inline |
Definition at line 80 of file RDatasetLoader.hxx.
| void ROOT::Experimental::Internal::ML::RDatasetLoader::SplitDatasets | ( | bool | concatenate | ) |
Load the dataframes into a single dataset and split it in training and validation rows.
| [in] | concatenate | Whether to concatenate the rows of all the dataframes into a single set |
Definition at line 106 of file RDatasetLoader.cxx.
| void ROOT::Experimental::Internal::ML::RDatasetLoader::SplitRows | ( | std::size_t | firstRow, |
| std::vector< std::size_t > & | TrainingRows, | ||
| std::vector< std::size_t > & | ValidationRows ) |
Split the rows of the dataset from firstRow on into training and validation rows.
| [in] | firstRow | First row of the dataframe in the dataset |
| [in] | TrainingRows | Rows of the training set, appended to |
| [in] | ValidationRows | Rows of the validation set, appended to |
Definition at line 85 of file RDatasetLoader.cxx.
|
private |
Definition at line 56 of file RDatasetLoader.hxx.
|
private |
Definition at line 57 of file RDatasetLoader.hxx.
|
private |
Definition at line 46 of file RDatasetLoader.hxx.
|
private |
Definition at line 58 of file RDatasetLoader.hxx.
|
private |
Definition at line 44 of file RDatasetLoader.hxx.
|
private |
Definition at line 52 of file RDatasetLoader.hxx.
|
private |
Definition at line 53 of file RDatasetLoader.hxx.
|
private |
Definition at line 59 of file RDatasetLoader.hxx.
|
private |
Definition at line 61 of file RDatasetLoader.hxx.
|
private |
Definition at line 42 of file RDatasetLoader.hxx.
|
private |
Definition at line 54 of file RDatasetLoader.hxx.
|
private |
Definition at line 49 of file RDatasetLoader.hxx.
|
private |
Definition at line 50 of file RDatasetLoader.hxx.
|
private |
Definition at line 39 of file RDatasetLoader.hxx.
|
private |
Definition at line 43 of file RDatasetLoader.hxx.
|
private |
Definition at line 41 of file RDatasetLoader.hxx.