![]() |
SG++-Doxygen-Documentation
|
Generate an instance of sgpp::datadriven::DataSource using the Builder Pattern. More...
#include <DataSourceBuilder.hpp>
Public Member Functions | |
DataSourceCrossValidation * | crossValidationAssemble () const |
Based on the currently specified configuration, build and configure an instance of a data source object that is able to perform cross validation. | |
DataSourceCrossValidation * | crossValidationFromConfig (const DataSourceConfig &config, const CrossvalidationConfiguration &crossValidationConfig) |
Factory method used to build an instance of a sgpp::datadriven::DataSourceCrossValidation object based on the passed configuration. | |
DataSourceBuilder ()=default | |
Default constructor. | |
DataSourceBuilder & | inBatches (size_t howMany) |
Optionally Specify the amount of batches if batch learning is used. | |
DataSourceSplitting * | splittingAssemble () const |
Based on the currently specified configuration, build and configure an instance of a data source object. | |
DataSourceSplitting * | splittingFromConfig (const DataSourceConfig &config) |
Factory method used to build an instance of a sgpp::datadriven::DataSourceSplitting object based on the passed configuration. | |
DataSourceBuilder & | withBatchSize (size_t batchSize) |
Optionally Specify the batch size if batch learning is used. | |
DataSourceBuilder & | withCompression (bool isCompressed) |
Optionally Specify if the file used is gz compressed. | |
DataSourceBuilder & | withFileType (DataSourceFileType fileType) |
Optionally Specify the file type if files are used. | |
DataSourceBuilder & | withPath (const std::string &filePath) |
Optionally specify a valid path to a file that should be read if files are used. | |
Generate an instance of sgpp::datadriven::DataSource using the Builder Pattern.
|
default |
Default constructor.
DataSourceCrossValidation * sgpp::datadriven::DataSourceBuilder::crossValidationAssemble | ( | ) | const |
Based on the currently specified configuration, build and configure an instance of a data source object that is able to perform cross validation.
References sgpp::datadriven::ARFF, sgpp::datadriven::DataShufflingFunctorFactory::buildDataShufflingFunctor(), sgpp::datadriven::CSV, sgpp::datadriven::DataSourceConfig::fileType_, and sgpp::datadriven::DataSourceConfig::isCompressed_.
Referenced by crossValidationFromConfig(), and main().
DataSourceCrossValidation * sgpp::datadriven::DataSourceBuilder::crossValidationFromConfig | ( | const DataSourceConfig & | config, |
const CrossvalidationConfiguration & | crossValidationConfig | ||
) |
Factory method used to build an instance of a sgpp::datadriven::DataSourceCrossValidation object based on the passed configuration.
config | configuration for the data source instance |
crossValidationConfig | configuration for the cross validation |
References crossValidationAssemble(), sgpp::datadriven::DataSourceConfig::fileType_, and sgpp::datadriven::NONE.
Referenced by sgpp::datadriven::MinerFactory::createDataSourceCrossValidation().
DataSourceBuilder & sgpp::datadriven::DataSourceBuilder::inBatches | ( | size_t | howMany | ) |
Optionally Specify the amount of batches if batch learning is used.
If no batch learning is used, all data is returned as a single batch (same as howMany=1).
howMany | amount of batches used in batch learning scenario. |
References sgpp::datadriven::DataSourceConfig::numBatches_.
DataSourceSplitting * sgpp::datadriven::DataSourceBuilder::splittingAssemble | ( | ) | const |
Based on the currently specified configuration, build and configure an instance of a data source object.
References sgpp::datadriven::ARFF, sgpp::datadriven::DataShufflingFunctorFactory::buildDataShufflingFunctor(), sgpp::datadriven::CSV, sgpp::datadriven::DataSourceConfig::fileType_, and sgpp::datadriven::DataSourceConfig::isCompressed_.
Referenced by splittingFromConfig().
DataSourceSplitting * sgpp::datadriven::DataSourceBuilder::splittingFromConfig | ( | const DataSourceConfig & | config | ) |
Factory method used to build an instance of a sgpp::datadriven::DataSourceSplitting object based on the passed configuration.
config | configuration for the data source instance |
References sgpp::datadriven::DataSourceConfig::fileType_, sgpp::datadriven::NONE, and splittingAssemble().
Referenced by sgpp::datadriven::MinerFactory::createDataSourceSplitting().
DataSourceBuilder & sgpp::datadriven::DataSourceBuilder::withBatchSize | ( | size_t | batchSize | ) |
Optionally Specify the batch size if batch learning is used.
If no batch learning is used this value defaults to 0 (all samples).
batchSize | size of batches used in batch learning scenario. |
References sgpp::datadriven::DataSourceConfig::batchSize_.
DataSourceBuilder & sgpp::datadriven::DataSourceBuilder::withCompression | ( | bool | isCompressed | ) |
Optionally Specify if the file used is gz compressed.
If data source does not use any files, this is set to false by default.
isCompressed | true if the file is compressed, false otherwise. |
References sgpp::datadriven::DataSourceConfig::isCompressed_.
DataSourceBuilder & sgpp::datadriven::DataSourceBuilder::withFileType | ( | DataSourceFileType | fileType | ) |
Optionally Specify the file type if files are used.
If data source does not use any files, this is set to none by default. See DataSourceFileType for supported file types.
fileType | value of |
References sgpp::datadriven::DataSourceConfig::fileType_.
DataSourceBuilder & sgpp::datadriven::DataSourceBuilder::withPath | ( | const std::string & | filePath | ) |
Optionally specify a valid path to a file that should be read if files are used.
If the file extension does not match a type from DataSourceFileType it has to be manually specified using DataSourceBuilder::withFileType.
filePath | valid path to a file that should be read by the data source. |
References sgpp::datadriven::DataSourceConfig::filePath_, sgpp::datadriven::DataSourceConfig::fileType_, and sgpp::datadriven::NONE.
Referenced by main().