SG++-Doxygen-Documentation
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::ModelFittingLeastSquares sgpp::datadriven::ModelFittingDensityEstimationCG sgpp::datadriven::ModelFittingDensityEstimationOnOff

Public Member Functions

GridgetGrid ()
 Get the underlying grid object for the current model. More...
 
DataVectorgetSurpluses ()
 Get the surpluses of the current grid. More...
 
 ModelFittingBaseSingleGrid ()
 Default constructor. More...
 
 ModelFittingBaseSingleGrid (const ModelFittingBaseSingleGrid &rhs)=delete
 Copy constructor - we cannot deep copy all member variables yet. More...
 
 ModelFittingBaseSingleGrid (ModelFittingBaseSingleGrid &&rhs)=default
 Move constructor. More...
 
ModelFittingBaseSingleGridoperator= (const ModelFittingBaseSingleGrid &rhs)=delete
 Copy assign operator - we cannot deep copy all member variables yet. More...
 
ModelFittingBaseSingleGridoperator= (ModelFittingBaseSingleGrid &&rhs)=default
 Move assign operator. More...
 
virtual ~ModelFittingBaseSingleGrid ()=default
 virtual destructor. More...
 
- Public Member Functions inherited from sgpp::datadriven::ModelFittingBase
virtual double evaluate (const DataVector &sample)=0
 Evaluate the fitted model at a single data point. More...
 
virtual void evaluate (DataMatrix &samples, DataVector &results)=0
 Evaluate the fitted model on a set of data points. More...
 
virtual void fit (Dataset &dataset)=0
 Polymorphic clone pattern. More...
 
const FitterConfigurationgetFitterConfiguration () const
 Get the configuration of the fitter object. More...
 
 ModelFittingBase ()
 Default constructor. More...
 
 ModelFittingBase (const ModelFittingBase &rhs)=delete
 Copy constructor - we cannot deep copy all member variables yet. More...
 
 ModelFittingBase (ModelFittingBase &&rhs)=default
 Move constructor. More...
 
ModelFittingBaseoperator= (const ModelFittingBase &rhs)=delete
 Copy assign operator - we cannot deep copy all member variables yet. More...
 
ModelFittingBaseoperator= (ModelFittingBase &&rhs)=default
 Move assign operator. More...
 
virtual bool refine ()=0
 Improve accuracy of the model on the given training data by adaptive refinement of the grid. More...
 
virtual void reset ()=0
 Resets the state of the entire model. More...
 
virtual void update (Dataset &dataset)=0
 Train the grid of an existing model with new samples. More...
 
virtual ~ModelFittingBase ()=default
 virtual destructor. More...
 

Protected Attributes

DataVector alpha
 hierarchical surpluses of the grid. More...
 
std::unique_ptr< Gridgrid
 the sparse grid that approximates the data. More...
 
- Protected Attributes inherited from sgpp::datadriven::ModelFittingBase
std::unique_ptr< FitterConfigurationconfig
 Configuration object for the fitter. More...
 
Datasetdataset
 Pointer to sgpp::datadriven::Dataset. More...
 
std::unique_ptr< SLESolversolver
 Solver for the learning problem. More...
 

Additional Inherited Members

- Public Attributes inherited from sgpp::datadriven::ModelFittingBase
bool verboseSolver
 Whether the Solver produces output or not. More...
 
- Protected Member Functions inherited from sgpp::datadriven::ModelFittingBase
GridbuildGrid (const RegularGridConfiguration &gridConfig) const
 Factory member function that generates a grid from configuration. More...
 
SLESolverbuildSolver (const SLESolverConfiguration &config) const
 Factory member function to build the solver for the least squares regression problem according to the config. More...
 
void reconfigureSolver (SLESolver &solver, const SLESolverConfiguration &config) const
 Configure solver based on the desired configuration. More...
 

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.

References alpha.

◆ 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()

Grid & sgpp::datadriven::ModelFittingBaseSingleGrid::getGrid ( )

Get the underlying grid object for the current model.

Returns
the grid object.

References grid.

◆ getSurpluses()

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

Get the surpluses of the current grid.

Returns
vector of surpluses.

References alpha.

◆ 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.

Member Data Documentation

◆ alpha

◆ grid

std::unique_ptr<Grid> sgpp::datadriven::ModelFittingBaseSingleGrid::grid
protected

the sparse grid that approximates the data.

Referenced by python.uq.learner.Interpolant.Interpolant::doLearningIteration(), python.learner.Classifier.Classifier::evalError(), python.uq.learner.Interpolant.Interpolant::evalError(), sgpp::datadriven::ModelFittingLeastSquares::evaluate(), sgpp::datadriven::ModelFittingDensityEstimationCG::evaluate(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::evaluate(), sgpp::datadriven::ModelFittingLeastSquares::fit(), sgpp::datadriven::ModelFittingDensityEstimationCG::fit(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::fit(), python.uq.learner.SimulationLearner.SimulationLearner::getCollocationNodes(), python.uq.learner.SimulationLearner.SimulationLearner::getGrid(), getGrid(), python.uq.learner.SimulationLearner.SimulationLearner::getLearner(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::isRefinable(), python.uq.learner.Regressor.Regressor::learnData(), python.uq.learner.Regressor.Regressor::learnDataWithFolding(), python.uq.learner.Regressor.Regressor::learnDataWithTest(), sgpp::datadriven::ModelFittingLeastSquares::refine(), sgpp::datadriven::ModelFittingDensityEstimation::refine(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::refine(), python.learner.Classifier.Classifier::refineGrid(), python.learner.Regressor.Regressor::refineGrid(), python.uq.learner.Regressor.Regressor::refineGrid(), python.uq.learner.SimulationLearner.SimulationLearner::refineGrid(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::reset(), sgpp::datadriven::ModelFittingLeastSquares::update(), sgpp::datadriven::ModelFittingDensityEstimationCG::update(), sgpp::datadriven::ModelFittingDensityEstimationOnOff::update(), python.learner.Classifier.Classifier::updateResults(), python.learner.Regressor.Regressor::updateResults(), and python.uq.learner.Regressor.Regressor::updateResults().


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