![]() |
SG++-Doxygen-Documentation
|
Base class for models operating on a single grid (i.e. More...
#include <ModelFittingBaseSingleGrid.hpp>
Public Member Functions | |
Grid & | getGrid () |
Get the underlying grid object for the current model. | |
DataVector & | getSurpluses () |
Get the surpluses of the current grid. | |
ModelFittingBaseSingleGrid () | |
Default constructor. | |
ModelFittingBaseSingleGrid (const ModelFittingBaseSingleGrid &rhs)=delete | |
Copy constructor - we cannot deep copy all member variables yet. | |
ModelFittingBaseSingleGrid (ModelFittingBaseSingleGrid &&rhs)=default | |
Move constructor. | |
ModelFittingBaseSingleGrid & | operator= (const ModelFittingBaseSingleGrid &rhs)=delete |
Copy assign operator - we cannot deep copy all member variables yet. | |
ModelFittingBaseSingleGrid & | operator= (ModelFittingBaseSingleGrid &&rhs)=default |
Move assign operator. | |
std::string | storeFitter () |
virtual | ~ModelFittingBaseSingleGrid ()=default |
virtual destructor. | |
![]() | |
virtual bool | adapt ()=0 |
Improve accuracy of the model on the given training data by adaptive refinement of the grid. | |
virtual double | computeResidual (DataMatrix &validationData) const =0 |
Should compute some kind of Residual to evaluate the fit of the model. | |
virtual double | evaluate (const DataVector &sample)=0 |
Evaluate the fitted model at a single data point. | |
virtual void | evaluate (DataMatrix &samples, DataVector &results)=0 |
Evaluate the fitted model on a set of data points. | |
virtual void | fit (Dataset &dataset)=0 |
Fit the grid to the dataset by determining the weights of an initial grid. | |
virtual void | fit (Dataset &datasetP, Dataset &datasetQ)=0 |
Dataset * | getDataset () |
FitterConfiguration & | getFitterConfiguration () |
Get or set the configuration of the fitter object. | |
const FitterConfiguration & | getFitterConfiguration () const |
Get the configuration of the fitter object. | |
virtual std::shared_ptr< BlacsProcessGrid > | getProcessGrid () const |
ModelFittingBase () | |
Default constructor. | |
ModelFittingBase (const ModelFittingBase &rhs)=delete | |
Copy constructor - we cannot deep copy all member variables yet. | |
ModelFittingBase (ModelFittingBase &&rhs)=default | |
Move constructor. | |
ModelFittingBase & | operator= (const ModelFittingBase &rhs)=delete |
Copy assign operator - we cannot deep copy all member variables yet. | |
ModelFittingBase & | operator= (ModelFittingBase &&rhs)=default |
Move assign operator. | |
virtual void | reset ()=0 |
Resets the state of the entire model. | |
virtual void | resetTraining ()=0 |
Resets any trained representations of the model, but does not reset the entire state. | |
virtual void | update (Dataset &dataset)=0 |
Train the grid of an existing model with new samples. | |
virtual void | update (Dataset &datasetP, Dataset &datasetQ)=0 |
virtual void | updateRegularization (double lambda)=0 |
Updates the regularization parameter lambda of the underlying model. | |
virtual | ~ModelFittingBase ()=default |
virtual destructor. | |
Protected Attributes | |
DataVector | alpha |
hierarchical surpluses of the grid. | |
std::unique_ptr< Grid > | grid |
the sparse grid that approximates the data. | |
![]() | |
std::unique_ptr< FitterConfiguration > | config |
Configuration object for the fitter. | |
Dataset * | dataset |
Pointer to sgpp::datadriven::Dataset. | |
Dataset * | extraDataset |
std::unique_ptr< std::set< std::set< size_t > > > | interactions |
std::unique_ptr< SLESolver > | solver |
Solver for the learning problem. | |
Additional Inherited Members | |
![]() | |
bool | verboseSolver |
Whether the Solver produces output or not. | |
![]() | |
Grid * | buildGrid (const sgpp::base::GeneralGridConfiguration &gridConfig) const |
Factory member function that generates a grid from configuration. | |
Grid * | buildGrid (const sgpp::base::GeneralGridConfiguration &gridConfig, const GeometryConfiguration &geometryConfig) const |
Factory member function that generates a grid from configuration. | |
SLESolver * | buildSolver (const SLESolverConfiguration &config) const |
Factory member function to build the solver for the least squares regression problem according to the config. | |
std::set< std::set< size_t > > | getInteractions (const GeometryConfiguration &geometryConfig) |
void | reconfigureSolver (SLESolver &solver, const SLESolverConfiguration &config) const |
Configure solver based on the desired configuration. | |
Base class for models operating on a single grid (i.e.
Least-Squares-Regression and density estimation
sgpp::datadriven::ModelFittingBaseSingleGrid::ModelFittingBaseSingleGrid | ( | ) |
Default constructor.
|
delete |
Copy constructor - we cannot deep copy all member variables yet.
rhs | const reference to the scorer object to copy from. |
|
default |
Move constructor.
rhs | R-value reference to a scorer object to moved from. |
|
virtualdefault |
virtual destructor.
|
virtual |
Get the underlying grid object for the current model.
Reimplemented from sgpp::datadriven::ModelFittingBase.
References grid.
Referenced by python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge::getSparseGridFunction(), python.uq.learner.SimulationLearner.SimulationLearner::learnData(), python.uq.learner.SimulationLearner.SimulationLearner::learnDataWithFolding(), python.uq.learner.SimulationLearner.SimulationLearner::learnDataWithTest(), python.uq.learner.SimulationLearner.SimulationLearner::refineGrid(), storeFitter(), sgpp::datadriven::VisualizerDensityEstimation::storeGrid(), sgpp::datadriven::VisualizerDensityEstimation::storeHeatmapJson(), and sgpp::datadriven::VisualizerDensityEstimation::storeHeatmapJson().
|
virtual |
Get the surpluses of the current grid.
Reimplemented from sgpp::datadriven::ModelFittingBase.
References alpha.
Referenced by storeFitter().
|
delete |
Copy assign operator - we cannot deep copy all member variables yet.
rhs | const reference to the scorer object to copy from. |
|
default |
Move assign operator.
rhs | R-value reference to an a scorer object to move from. |
std::string sgpp::datadriven::ModelFittingBaseSingleGrid::storeFitter | ( | ) |
References getGrid(), getSurpluses(), sgpp::base::Grid::serialize(), and sgpp::base::DataVector::toString().
|
protected |
hierarchical surpluses of the grid.
Referenced by sgpp::datadriven::ModelFittingDensityRatioEstimation::adapt(), sgpp::datadriven::ModelFittingLeastSquares::adapt(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationCG::adapt(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationOnOff::adapt(), sgpp::datadriven::ModelFittingDensityEstimationCG::adapt(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::adapt(), sgpp::datadriven::ModelFittingDensityEstimationOnOffParallel::adapt(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::computeResidual(), python.learner.Learner.Learner::doLearningIteration(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationCG::evaluate(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationOnOff::evaluate(), sgpp::datadriven::ModelFittingDensityEstimationCG::evaluate(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::evaluate(), sgpp::datadriven::ModelFittingDensityEstimationOnOffParallel::evaluate(), sgpp::datadriven::ModelFittingDensityRatioEstimation::evaluate(), sgpp::datadriven::ModelFittingLeastSquares::evaluate(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationCG::evaluate(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationOnOff::evaluate(), sgpp::datadriven::ModelFittingDensityEstimationCG::evaluate(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::evaluate(), sgpp::datadriven::ModelFittingDensityEstimationOnOffParallel::evaluate(), sgpp::datadriven::ModelFittingDensityRatioEstimation::evaluate(), sgpp::datadriven::ModelFittingLeastSquares::evaluate(), sgpp::datadriven::ModelFittingDensityEstimationCG::fit(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::fit(), sgpp::datadriven::ModelFittingDensityEstimationOnOffParallel::fit(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationCG::fit(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationOnOff::fit(), sgpp::datadriven::ModelFittingLeastSquares::fit(), sgpp::datadriven::ModelFittingDensityRatioEstimation::fit(), sgpp::datadriven::ModelFittingDensityEstimation::getCoarseningFunctor(), sgpp::datadriven::ModelFittingDensityEstimation::getRefinementFunctor(), getSurpluses(), python.learner.Learner.Learner::learnData(), python.learner.Learner.Learner::learnDataWithTest(), python.uq.learner.Interpolant.Interpolant::learnDataWithTest(), python.uq.dists.SGDEdist.SGDEdist::pdf(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::resetTraining(), sgpp::datadriven::ModelFittingDensityEstimationOnOffParallel::resetTraining(), python.uq.dists.SGDEdist.SGDEdist::toJson(), sgpp::datadriven::ModelFittingDensityEstimationCG::update(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::update(), sgpp::datadriven::ModelFittingDensityEstimationOnOffParallel::update(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationCG::update(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationOnOff::update(), sgpp::datadriven::ModelFittingLeastSquares::update(), and sgpp::datadriven::ModelFittingDensityRatioEstimation::update().
|
protected |
the sparse grid that approximates the data.
Referenced by python.uq.dists.SGDEdist.SGDEdist::__str__(), sgpp::datadriven::ModelFittingDensityEstimation::adapt(), sgpp::datadriven::ModelFittingDensityRatioEstimation::adapt(), sgpp::datadriven::ModelFittingLeastSquares::adapt(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationOnOff::adapt(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::adapt(), sgpp::datadriven::ModelFittingDensityEstimationOnOffParallel::adapt(), python.learner.Learner.Learner::applyData(), python.tools.Matrix::ApplyMatrix(), python.uq.dists.SGDEdist.SGDEdist::cdf(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::computeResidual(), sgpp::datadriven::ModelFittingDensityEstimationOnOffParallel::computeResidual(), python.uq.learner.Interpolant.Interpolant::doLearningIteration(), python.learner.Learner.Learner::doLearningIteration(), python.learner.Classifier.Classifier::evalError(), python.uq.learner.Interpolant.Interpolant::evalError(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationCG::evaluate(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationOnOff::evaluate(), sgpp::datadriven::ModelFittingDensityEstimationCG::evaluate(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::evaluate(), sgpp::datadriven::ModelFittingDensityEstimationOnOffParallel::evaluate(), sgpp::datadriven::ModelFittingDensityRatioEstimation::evaluate(), sgpp::datadriven::ModelFittingLeastSquares::evaluate(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationCG::evaluate(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationOnOff::evaluate(), sgpp::datadriven::ModelFittingDensityEstimationCG::evaluate(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::evaluate(), sgpp::datadriven::ModelFittingDensityEstimationOnOffParallel::evaluate(), sgpp::datadriven::ModelFittingDensityRatioEstimation::evaluate(), sgpp::datadriven::ModelFittingLeastSquares::evaluate(), sgpp::datadriven::ModelFittingDensityEstimationCG::fit(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::fit(), sgpp::datadriven::ModelFittingDensityEstimationOnOffParallel::fit(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationCG::fit(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationOnOff::fit(), sgpp::datadriven::ModelFittingLeastSquares::fit(), sgpp::datadriven::ModelFittingDensityRatioEstimation::fit(), python.tools.Matrix::generateb(), python.controller.CheckpointController.CheckpointController::generateFoldValidationJob(), python.uq.learner.SimulationLearner.SimulationLearner::getCollocationNodes(), getGrid(), python.uq.learner.SimulationLearner.SimulationLearner::getGrid(), python.uq.learner.SimulationLearner.SimulationLearner::getLearner(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationOnOff::isRefinable(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::isRefinable(), sgpp::datadriven::ModelFittingDensityEstimationOnOffParallel::isRefinable(), python.learner.Learner.Learner::learnData(), python.learner.Learner.Learner::learnDataWithFolding(), python.uq.learner.Regressor.Regressor::learnDataWithFolding(), python.learner.Learner.Learner::learnDataWithTest(), python.uq.learner.Regressor.Regressor::learnDataWithTest(), python.controller.CheckpointController.CheckpointController::loadAll(), python.uq.operations.forcePositivity.operationMakePositive.OperationMakePositive::makePositive(), python.uq.operations.forcePositivity.operationMakePositiveFast.OperationMakePositiveFast::makePositive(), python.uq.dists.SGDEdist.SGDEdist::mean(), python.uq.dists.SGDEdist.SGDEdist::pdf(), python.uq.dists.SGDEdist.SGDEdist::ppf(), python.learner.Classifier.Classifier::refineGrid(), python.learner.Regressor.Regressor::refineGrid(), python.uq.learner.Regressor.Regressor::refineGrid(), python.uq.learner.SimulationLearner.SimulationLearner::refineGrid(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationCG::reset(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationOnOff::reset(), sgpp::datadriven::ModelFittingDensityEstimationCG::reset(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::reset(), sgpp::datadriven::ModelFittingDensityEstimationOnOffParallel::reset(), sgpp::datadriven::ModelFittingDensityRatioEstimation::reset(), sgpp::datadriven::ModelFittingLeastSquares::reset(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::resetTraining(), sgpp::datadriven::ModelFittingDensityEstimationOnOffParallel::resetTraining(), python.controller.CheckpointController.CheckpointController::saveGrid(), python.controller.CheckpointController.CheckpointController::setGrid(), python.learner.Learner.Learner::setGrid(), python.uq.learner.Learner.Learner::setGrid(), python.uq.operations.forcePositivity.localFullGridSearch.LocalFullGrid::split(), python.uq.dists.SGDEdist.SGDEdist::toJson(), sgpp::datadriven::ModelFittingDensityEstimationCG::update(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::update(), sgpp::datadriven::ModelFittingDensityEstimationOnOffParallel::update(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationCG::update(), sgpp::datadriven::ModelFittingDensityDifferenceEstimationOnOff::update(), sgpp::datadriven::ModelFittingLeastSquares::update(), sgpp::datadriven::ModelFittingDensityRatioEstimation::update(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::updateRegularization(), sgpp::datadriven::ModelFittingDensityEstimationOnOffParallel::updateRegularization(), and python.uq.dists.SGDEdist.SGDEdist::var().