SG++-Doxygen-Documentation
sgpp::datadriven::DataSourceSplitting Class Reference

DataSourceSlitting is a high level interface to provide functionality for processing data epoch-wise with a validation set that is retrieved at initialization time using the first samples the sample provider provides. More...

#include <DataSourceSplitting.hpp>

Inheritance diagram for sgpp::datadriven::DataSourceSplitting:
sgpp::datadriven::DataSource

Public Member Functions

 DataSourceSplitting (const DataSourceConfig &config, SampleProvider *sampleProvider)
 Constructor. More...
 
DatasetgetValidationData () override
 Returns the data that is used for validation. More...
 
void reset ()
 Resets the state of the the sample provider to begin a new training epoch. More...
 
- Public Member Functions inherited from sgpp::datadriven::DataSource
DataSourceIterator begin ()
 Return an iterator object pointing to the first batch of this DataSource. More...
 
 DataSource (DataSourceConfig config, SampleProvider *sampleProvider)
 Constructor. More...
 
DataSourceIterator end ()
 Return an iterator object pointing to the last possible batch of this DataSource. More...
 
const DataSourceConfiggetConfig () const
 Read only access to the configuration used by DataSource and underlying SampleProvider. More...
 
size_t getCurrentIteration () const
 Return how many batches have already been requested from this DataSource. More...
 
virtual DatasetgetNextSamples ()
 Request data from the underlying SampleProvider as specified in the provided configuration object upon construction. More...
 
virtual ~DataSource ()=default
 

Additional Inherited Members

- Protected Attributes inherited from sgpp::datadriven::DataSource
DataSourceConfig config
 Configuration file that determines all relevant properties of the object. More...
 
size_t currentIteration
 counter variable if data is requested in batches. More...
 
DataTransformationdataTransformation
 pointer to DataTransformation to perform transformations on init. More...
 
std::unique_ptr< SampleProvidersampleProvider
 pointer to sample provider that actually handles data aquisition. More...
 

Detailed Description

DataSourceSlitting is a high level interface to provide functionality for processing data epoch-wise with a validation set that is retrieved at initialization time using the first samples the sample provider provides.

Constructor & Destructor Documentation

◆ DataSourceSplitting()

sgpp::datadriven::DataSourceSplitting::DataSourceSplitting ( const DataSourceConfig config,
SampleProvider sampleProvider 
)

Constructor.

Parameters
configconfiguration object used for the data source
sampleProviderthe sample provider to operate on.

References sgpp::datadriven::DataSource::config.

Member Function Documentation

◆ getValidationData()

Dataset * sgpp::datadriven::DataSourceSplitting::getValidationData ( )
overridevirtual

Returns the data that is used for validation.

Returns
pointer to the validation dataset

Implements sgpp::datadriven::DataSource.

◆ reset()

void sgpp::datadriven::DataSourceSplitting::reset ( )

Resets the state of the the sample provider to begin a new training epoch.

References sgpp::datadriven::DataSource::config, and sgpp::datadriven::DataSourceConfig::validationPortion.


The documentation for this class was generated from the following files: