SG++-Doxygen-Documentation
|
#include <DataMiningConfigParser.hpp>
Public Member Functions | |
DataMiningConfigParser (const std::string &filepath) | |
bool | getDataSourceConfig (DataSourceConfig &config, const DataSourceConfig &defaults) const |
bool | getFitterAdaptivityConfig (AdaptivityConfiguration &config, const AdaptivityConfiguration &defaults) const |
bool | getFitterConfigType (FitterType &fitter, const FitterType &defaults) const |
bool | getFitterCrossvalidationConfig (CrossvalidationConfiguration &config, const CrossvalidationConfiguration &defaults) const |
bool | getFitterDatabaseConfig (datadriven::DatabaseConfiguration &config, const datadriven::DatabaseConfiguration &defaults) const |
Returns the database configuration of the fitter if it exists. More... | |
bool | getFitterDensityEstimationConfig (DensityEstimationConfiguration &config, const DensityEstimationConfiguration &defaults) const |
bool | getFitterGridConfig (RegularGridConfiguration &config, const RegularGridConfiguration &defaults) const |
bool | getFitterLambda (double &lambda, double defaultValue) const |
bool | getFitterLearnerConfig (datadriven::LearnerConfiguration &config, const datadriven::LearnerConfiguration &defaults) const |
Initializes the learner configuration if it exists. More... | |
bool | getFitterRegularizationConfig (RegularizationConfiguration &config, const RegularizationConfiguration &defaults) const |
bool | getFitterSolverFinalConfig (SLESolverConfiguration &config, const SLESolverConfiguration &defaults) const |
bool | getFitterSolverRefineConfig (SLESolverConfiguration &config, const SLESolverConfiguration &defaults) const |
void | getHPOConfig (HPOConfig &config) |
std::string | getHPOMethod (std::string defaultValue) const |
void | getHyperparameters (std::map< std::string, ContinuousParameter > &conpar, std::map< std::string, DiscreteParameter > &dispar, std::map< std::string, DiscreteParameter > &catpar, std::vector< base::GridType > &basisFunctions) const |
bool | getScorerConfig (ScorerConfiguration &config, const ScorerConfiguration &defaults) const |
Reads the configuration for the scorer. More... | |
bool | hasDataSourceConfig () const |
bool | hasDataTransformationConfig () const |
bool | hasFitterConfig () const |
bool | hasFitterConfigCrossValidation () const |
Checks whether the fitter configuration contains a cross validation configuration. More... | |
bool | hasScorerConfig () const |
std::vector< int64_t > | parseIntArray (DictNode &dict, const std::string &key, std::vector< int64_t > defaultValue, const std::string &parentNode) const |
virtual | ~DataMiningConfigParser () |
|
explicit |
References json::json_exception::what().
|
virtual |
bool sgpp::datadriven::DataMiningConfigParser::getDataSourceConfig | ( | DataSourceConfig & | config, |
const DataSourceConfig & | defaults | ||
) | const |
References sgpp::datadriven::DataSourceConfig::batchSize, sgpp::datadriven::DataSourceConfig::dataTransformationConfig, sgpp::datadriven::DataSourceConfig::epochs, sgpp::datadriven::DataSourceConfig::filePath, sgpp::datadriven::DataSourceConfig::fileType, hasDataSourceConfig(), hasDataTransformationConfig(), sgpp::datadriven::DataSourceConfig::hasTargets, sgpp::datadriven::DataSourceConfig::isCompressed, sgpp::datadriven::DataSourceConfig::numBatches, sgpp::datadriven::DataSourceShufflingTypeParser::parse(), sgpp::datadriven::DataSourceFileTypeParser::parse(), sgpp::datadriven::DataSourceConfig::randomSeed, sgpp::datadriven::DataSourceConfig::readinClasses, sgpp::datadriven::DataSourceConfig::readinColumns, sgpp::datadriven::DataSourceConfig::readinCutoff, sgpp::datadriven::DataSourceConfig::shuffling, sgpp::datadriven::DataSourceShufflingTypeParser::toString(), sgpp::datadriven::DataSourceFileTypeParser::toString(), and sgpp::datadriven::DataSourceConfig::validationPortion.
Referenced by sgpp::datadriven::MinerFactory::createDataSourceCrossValidation(), and sgpp::datadriven::MinerFactory::createDataSourceSplitting().
bool sgpp::datadriven::DataMiningConfigParser::getFitterAdaptivityConfig | ( | AdaptivityConfiguration & | config, |
const AdaptivityConfiguration & | defaults | ||
) | const |
References sgpp::base::AdaptivityConfiguration::errorBasedRefinement, sgpp::base::AdaptivityConfiguration::errorBufferSize, sgpp::base::AdaptivityConfiguration::errorConvergenceThreshold, sgpp::base::AdaptivityConfiguration::errorMinInterval, hasFitterConfig(), python.statsfileInfo::i, sgpp::base::AdaptivityConfiguration::levelPenalize, sgpp::base::AdaptivityConfiguration::maxLevelType_, sgpp::base::AdaptivityConfiguration::noPoints_, sgpp::base::AdaptivityConfiguration::numRefinements_, sgpp::datadriven::RefinementFunctorTypeParser::parse(), sgpp::base::AdaptivityConfiguration::percent_, sgpp::base::AdaptivityConfiguration::precomputeEvaluations, sgpp::base::AdaptivityConfiguration::refinementFunctorType, sgpp::base::AdaptivityConfiguration::refinementPeriod, sgpp::base::AdaptivityConfiguration::scalingCoefficients, json::ListNode::size(), sgpp::base::AdaptivityConfiguration::threshold_, and sgpp::datadriven::RefinementFunctorTypeParser::toString().
Referenced by sgpp::datadriven::FitterConfigurationDensityEstimation::readParams(), and sgpp::datadriven::FitterConfigurationLeastSquares::readParams().
bool sgpp::datadriven::DataMiningConfigParser::getFitterConfigType | ( | FitterType & | fitter, |
const FitterType & | defaults | ||
) | const |
References hasFitterConfig(), and sgpp::datadriven::FitterTypeParser::parse().
bool sgpp::datadriven::DataMiningConfigParser::getFitterCrossvalidationConfig | ( | CrossvalidationConfiguration & | config, |
const CrossvalidationConfiguration & | defaults | ||
) | const |
References sgpp::datadriven::CrossvalidationConfiguration::enable_, hasFitterConfig(), sgpp::datadriven::CrossvalidationConfiguration::kfold_, sgpp::datadriven::CrossvalidationConfiguration::lambda_, sgpp::datadriven::CrossvalidationConfiguration::lambdaEnd_, sgpp::datadriven::CrossvalidationConfiguration::lambdaStart_, sgpp::datadriven::CrossvalidationConfiguration::lambdaSteps_, sgpp::datadriven::CrossvalidationConfiguration::logScale_, sgpp::datadriven::CrossvalidationConfiguration::seed_, sgpp::datadriven::CrossvalidationConfiguration::shuffle_, and sgpp::datadriven::CrossvalidationConfiguration::silent_.
Referenced by sgpp::datadriven::MinerFactory::createDataSourceCrossValidation().
bool sgpp::datadriven::DataMiningConfigParser::getFitterDatabaseConfig | ( | datadriven::DatabaseConfiguration & | config, |
const datadriven::DatabaseConfiguration & | defaults | ||
) | const |
Returns the database configuration of the fitter if it exists.
config | the configuration object that will be initialized |
defaults | default values if the fitter does not contain a database configuration |
References sgpp::datadriven::DatabaseConfiguration::filepath, and hasFitterConfig().
Referenced by sgpp::datadriven::FitterConfigurationDensityEstimation::readParams().
bool sgpp::datadriven::DataMiningConfigParser::getFitterDensityEstimationConfig | ( | DensityEstimationConfiguration & | config, |
const DensityEstimationConfiguration & | defaults | ||
) | const |
References sgpp::datadriven::DensityEstimationConfiguration::decomposition_, hasFitterConfig(), sgpp::datadriven::DensityEstimationConfiguration::iCholSweepsDecompose_, sgpp::datadriven::DensityEstimationConfiguration::iCholSweepsRefine_, sgpp::datadriven::DensityEstimationConfiguration::iCholSweepsSolver_, sgpp::datadriven::DensityEstimationConfiguration::iCholSweepsUpdateLambda_, sgpp::datadriven::MatrixDecompositionTypeParser::parse(), sgpp::datadriven::DensityEstimationTypeParser::parse(), sgpp::datadriven::DensityEstimationTypeParser::toString(), sgpp::datadriven::MatrixDecompositionTypeParser::toString(), and sgpp::datadriven::DensityEstimationConfiguration::type_.
Referenced by sgpp::datadriven::FitterConfigurationDensityEstimation::readParams().
bool sgpp::datadriven::DataMiningConfigParser::getFitterGridConfig | ( | RegularGridConfiguration & | config, |
const RegularGridConfiguration & | defaults | ||
) | const |
References sgpp::base::GeneralGridConfiguration::boundaryLevel_, sgpp::base::GeneralGridConfiguration::dim_, sgpp::base::GeneralGridConfiguration::filename_, hasFitterConfig(), sgpp::base::GeneralGridConfiguration::level_, sgpp::base::GeneralGridConfiguration::maxDegree_, sgpp::datadriven::GridTypeParser::parse(), sgpp::datadriven::GridTypeParser::toString(), and sgpp::base::GeneralGridConfiguration::type_.
Referenced by sgpp::datadriven::FitterConfigurationDensityEstimation::readParams(), and sgpp::datadriven::FitterConfigurationLeastSquares::readParams().
bool sgpp::datadriven::DataMiningConfigParser::getFitterLambda | ( | double & | lambda, |
double | defaultValue | ||
) | const |
bool sgpp::datadriven::DataMiningConfigParser::getFitterLearnerConfig | ( | datadriven::LearnerConfiguration & | config, |
const datadriven::LearnerConfiguration & | defaults | ||
) | const |
Initializes the learner configuration if it exists.
config | the configuration instance that will be initialized |
defaults | default values if the fitter config does not contain a matching entry |
References sgpp::datadriven::LearnerConfiguration::beta, hasFitterConfig(), and sgpp::datadriven::LearnerConfiguration::usePrior.
Referenced by sgpp::datadriven::FitterConfigurationDensityEstimation::readParams().
bool sgpp::datadriven::DataMiningConfigParser::getFitterRegularizationConfig | ( | RegularizationConfiguration & | config, |
const RegularizationConfiguration & | defaults | ||
) | const |
References json::DictNode::contains(), sgpp::datadriven::RegularizationConfiguration::exponentBase_, json::Node::get(), json::Node::getBool(), json::Node::getDouble(), json::Node::getInt(), json::Node::getUInt(), hasFitterConfig(), sgpp::datadriven::RegularizationConfiguration::l1Ratio_, sgpp::datadriven::RegularizationConfiguration::lambda_, sgpp::datadriven::RegularizationTypeParser::parse(), sgpp::combigrid::pow(), sgpp::datadriven::RegularizationTypeParser::toString(), and sgpp::datadriven::RegularizationConfiguration::type_.
Referenced by sgpp::datadriven::FitterConfigurationDensityEstimation::readParams(), and sgpp::datadriven::FitterConfigurationLeastSquares::readParams().
bool sgpp::datadriven::DataMiningConfigParser::getFitterSolverFinalConfig | ( | SLESolverConfiguration & | config, |
const SLESolverConfiguration & | defaults | ||
) | const |
bool sgpp::datadriven::DataMiningConfigParser::getFitterSolverRefineConfig | ( | SLESolverConfiguration & | config, |
const SLESolverConfiguration & | defaults | ||
) | const |
void sgpp::datadriven::DataMiningConfigParser::getHPOConfig | ( | HPOConfig & | config | ) |
References sgpp::datadriven::HPOConfig::getConstraints(), sgpp::datadriven::HPOConfig::getLambda(), sgpp::datadriven::HPOConfig::getNRandom(), sgpp::datadriven::HPOConfig::getNRuns(), sgpp::datadriven::HPOConfig::getNTrainSamples(), sgpp::datadriven::HPOConfig::getSeed(), sgpp::datadriven::HPOConfig::getStages(), parseIntArray(), sgpp::datadriven::HPOConfig::setConstraints(), sgpp::datadriven::HPOConfig::setLambda(), sgpp::datadriven::HPOConfig::setNRandom(), sgpp::datadriven::HPOConfig::setNRuns(), sgpp::datadriven::HPOConfig::setNTrainSamples(), sgpp::datadriven::HPOConfig::setSeed(), and sgpp::datadriven::HPOConfig::setStages().
Referenced by sgpp::datadriven::HyperparameterOptimizer::HyperparameterOptimizer().
std::string sgpp::datadriven::DataMiningConfigParser::getHPOMethod | ( | std::string | defaultValue | ) | const |
References json::DictNode::contains(), sgpp::datadriven::RosenblattTransformationConfig::gridLevel, sgpp::datadriven::RosenblattTransformationConfig::numSamples, sgpp::datadriven::DataTransformationTypeParser::parse(), sgpp::datadriven::ROSENBLATT, sgpp::datadriven::DataTransformationConfig::rosenblattConfig, sgpp::datadriven::RosenblattTransformationConfig::solverEps, sgpp::datadriven::RosenblattTransformationConfig::solverMaxIterations, sgpp::datadriven::RosenblattTransformationConfig::solverThreshold, sgpp::datadriven::DataTransformationTypeParser::toString(), and sgpp::datadriven::DataTransformationConfig::type.
Referenced by sgpp::datadriven::DensityEstimationMinerFactory::buildHPO(), and sgpp::datadriven::MinerFactory::buildHPO().
void sgpp::datadriven::DataMiningConfigParser::getHyperparameters | ( | std::map< std::string, ContinuousParameter > & | conpar, |
std::map< std::string, DiscreteParameter > & | dispar, | ||
std::map< std::string, DiscreteParameter > & | catpar, | ||
std::vector< base::GridType > & | basisFunctions | ||
) | const |
bool sgpp::datadriven::DataMiningConfigParser::getScorerConfig | ( | ScorerConfiguration & | config, |
const ScorerConfiguration & | defaults | ||
) | const |
Reads the configuration for the scorer.
config | the configuration instance to initialize |
defaults | a set of configurations initialized with default values |
References hasScorerConfig(), sgpp::datadriven::ScorerConfiguration::metric, sgpp::datadriven::ScorerMetricTypeParser::parse(), and sgpp::datadriven::ScorerMetricTypeParser::toString().
Referenced by sgpp::datadriven::ScorerFactory::buildScorer().
bool sgpp::datadriven::DataMiningConfigParser::hasDataSourceConfig | ( | ) | const |
Referenced by getDataSourceConfig(), and hasDataTransformationConfig().
bool sgpp::datadriven::DataMiningConfigParser::hasDataTransformationConfig | ( | ) | const |
References hasDataSourceConfig().
Referenced by getDataSourceConfig().
bool sgpp::datadriven::DataMiningConfigParser::hasFitterConfig | ( | ) | const |
Referenced by getFitterAdaptivityConfig(), getFitterConfigType(), getFitterCrossvalidationConfig(), getFitterDatabaseConfig(), getFitterDensityEstimationConfig(), getFitterGridConfig(), getFitterLearnerConfig(), getFitterRegularizationConfig(), getFitterSolverFinalConfig(), getFitterSolverRefineConfig(), and hasFitterConfigCrossValidation().
bool sgpp::datadriven::DataMiningConfigParser::hasFitterConfigCrossValidation | ( | ) | const |
Checks whether the fitter configuration contains a cross validation configuration.
References hasFitterConfig().
Referenced by sgpp::datadriven::MinerFactory::buildMiner().
bool sgpp::datadriven::DataMiningConfigParser::hasScorerConfig | ( | ) | const |
Referenced by getScorerConfig().
std::vector< int64_t > sgpp::datadriven::DataMiningConfigParser::parseIntArray | ( | DictNode & | dict, |
const std::string & | key, | ||
std::vector< int64_t > | defaultValue, | ||
const std::string & | parentNode | ||
) | const |
References json::DictNode::contains(), sgpp::solver::SLESolverConfiguration::eps_, json::Node::get(), python.statsfileInfo::i, sgpp::solver::SLESolverConfiguration::maxIterations_, sgpp::datadriven::SLESolverTypeParser::parse(), json::DictNode::size(), sgpp::solver::SLESolverConfiguration::threshold_, sgpp::datadriven::SLESolverTypeParser::toString(), and sgpp::solver::SLESolverConfiguration::type_.
Referenced by getHPOConfig().