SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
sgpp::datadriven::ModelFittingBaseSingleGrid Class Reference

Base class for models operating on a single grid (i.e. More...

#include <ModelFittingBaseSingleGrid.hpp>

Inheritance diagram for sgpp::datadriven::ModelFittingBaseSingleGrid:
sgpp::datadriven::ModelFittingBase sgpp::datadriven::ModelFittingDensityEstimation sgpp::datadriven::ModelFittingDensityRatioEstimation sgpp::datadriven::ModelFittingLeastSquares sgpp::datadriven::ModelFittingDensityDifferenceEstimationCG sgpp::datadriven::ModelFittingDensityDifferenceEstimationOnOff sgpp::datadriven::ModelFittingDensityEstimationCG sgpp::datadriven::ModelFittingDensityEstimationCombi sgpp::datadriven::ModelFittingDensityEstimationOnOff sgpp::datadriven::ModelFittingDensityEstimationOnOffParallel

Public Member Functions

GridgetGrid ()
 Get the underlying grid object for the current model.
 
DataVectorgetSurpluses ()
 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.
 
ModelFittingBaseSingleGridoperator= (const ModelFittingBaseSingleGrid &rhs)=delete
 Copy assign operator - we cannot deep copy all member variables yet.
 
ModelFittingBaseSingleGridoperator= (ModelFittingBaseSingleGrid &&rhs)=default
 Move assign operator.
 
std::string storeFitter ()
 
virtual ~ModelFittingBaseSingleGrid ()=default
 virtual destructor.
 
- Public Member Functions inherited from sgpp::datadriven::ModelFittingBase
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
 
DatasetgetDataset ()
 
FitterConfigurationgetFitterConfiguration ()
 Get or set the configuration of the fitter object.
 
const FitterConfigurationgetFitterConfiguration () const
 Get the configuration of the fitter object.
 
virtual std::shared_ptr< BlacsProcessGridgetProcessGrid () 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.
 
ModelFittingBaseoperator= (const ModelFittingBase &rhs)=delete
 Copy assign operator - we cannot deep copy all member variables yet.
 
ModelFittingBaseoperator= (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< Gridgrid
 the sparse grid that approximates the data.
 
- Protected Attributes inherited from sgpp::datadriven::ModelFittingBase
std::unique_ptr< FitterConfigurationconfig
 Configuration object for the fitter.
 
Datasetdataset
 Pointer to sgpp::datadriven::Dataset.
 
DatasetextraDataset
 
std::unique_ptr< std::set< std::set< size_t > > > interactions
 
std::unique_ptr< SLESolversolver
 Solver for the learning problem.
 

Additional Inherited Members

- Public Attributes inherited from sgpp::datadriven::ModelFittingBase
bool verboseSolver
 Whether the Solver produces output or not.
 
- Protected Member Functions inherited from sgpp::datadriven::ModelFittingBase
GridbuildGrid (const sgpp::base::GeneralGridConfiguration &gridConfig) const
 Factory member function that generates a grid from configuration.
 
GridbuildGrid (const sgpp::base::GeneralGridConfiguration &gridConfig, const GeometryConfiguration &geometryConfig) const
 Factory member function that generates a grid from configuration.
 
SLESolverbuildSolver (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.
 

Detailed Description

Base class for models operating on a single grid (i.e.

Least-Squares-Regression and density estimation

Constructor & Destructor Documentation

◆ ModelFittingBaseSingleGrid() [1/3]

sgpp::datadriven::ModelFittingBaseSingleGrid::ModelFittingBaseSingleGrid ( )

Default constructor.

◆ ModelFittingBaseSingleGrid() [2/3]

sgpp::datadriven::ModelFittingBaseSingleGrid::ModelFittingBaseSingleGrid ( const ModelFittingBaseSingleGrid rhs)
delete

Copy constructor - we cannot deep copy all member variables yet.

Parameters
rhsconst reference to the scorer object to copy from.

◆ ModelFittingBaseSingleGrid() [3/3]

sgpp::datadriven::ModelFittingBaseSingleGrid::ModelFittingBaseSingleGrid ( ModelFittingBaseSingleGrid &&  rhs)
default

Move constructor.

Parameters
rhsR-value reference to a scorer object to moved from.

◆ ~ModelFittingBaseSingleGrid()

virtual sgpp::datadriven::ModelFittingBaseSingleGrid::~ModelFittingBaseSingleGrid ( )
virtualdefault

virtual destructor.

Member Function Documentation

◆ getGrid()

◆ getSurpluses()

DataVector & sgpp::datadriven::ModelFittingBaseSingleGrid::getSurpluses ( )
virtual

Get the surpluses of the current grid.

Returns
vector of surpluses.

Reimplemented from sgpp::datadriven::ModelFittingBase.

References alpha.

Referenced by storeFitter().

◆ operator=() [1/2]

ModelFittingBaseSingleGrid & sgpp::datadriven::ModelFittingBaseSingleGrid::operator= ( const ModelFittingBaseSingleGrid rhs)
delete

Copy assign operator - we cannot deep copy all member variables yet.

Parameters
rhsconst reference to the scorer object to copy from.
Returns
rerefernce to this with updated values.

◆ operator=() [2/2]

ModelFittingBaseSingleGrid & sgpp::datadriven::ModelFittingBaseSingleGrid::operator= ( ModelFittingBaseSingleGrid &&  rhs)
default

Move assign operator.

Parameters
rhsR-value reference to an a scorer object to move from.
Returns
rerefernce to this with updated values.

◆ storeFitter()

std::string sgpp::datadriven::ModelFittingBaseSingleGrid::storeFitter ( )

Member Data Documentation

◆ alpha

DataVector sgpp::datadriven::ModelFittingBaseSingleGrid::alpha
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().

◆ grid

std::unique_ptr<Grid> sgpp::datadriven::ModelFittingBaseSingleGrid::grid
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().


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