![]()  | 
  
    SG++-Doxygen-Documentation
    
   | 
 
This class implements standard sparse grid regression with an Identity matrix as regularization operator. More...
#include <LearnerLeastSquaresIdentity.hpp>
  
 Public Member Functions | |
| std::vector< std::pair< size_t, double > > | getRefinementExecTimes () | 
| LearnerLeastSquaresIdentity (const bool isRegression, const bool isVerbose=true) | |
| Constructor.  More... | |
| void | multTranspose (sgpp::base::DataMatrix &dataset, sgpp::base::DataVector &multiplier, sgpp::base::DataVector &result) override | 
| void | predict (sgpp::base::DataMatrix &testDataset, sgpp::base::DataVector &classesComputed) override | 
| executes a Regression test for a given dataset and returns the result  More... | |
| void | setImplementation (sgpp::datadriven::OperationMultipleEvalConfiguration operationConfiguration) | 
| double | testRegular (const sgpp::base::RegularGridConfiguration &GridConfig, sgpp::base::DataMatrix &testDataset) | 
| virtual | ~LearnerLeastSquaresIdentity () | 
| Destructor.  More... | |
  Public Member Functions inherited from sgpp::datadriven::LearnerBase | |
| void | dumpFunction (std::string tFilename, size_t resolution) | 
| simple dump of sparse grid function into file, e.g.  More... | |
| void | dumpGrid (std::string tFilename) | 
| simple dump of grid points into file, e.g.  More... | |
| virtual double | getAccuracy (sgpp::base::DataMatrix &testDataset, const sgpp::base::DataVector &classesReference, const double threshold=0.0) | 
| compute the accuracy for given testDataset.  More... | |
| virtual double | getAccuracy (const sgpp::base::DataVector &classesComputed, const sgpp::base::DataVector &classesReference, const double threshold=0.0) | 
| compute the accuracy for given testDataset.  More... | |
| sgpp::base::DataVector & | getAlpha () | 
| virtual ClassificatorQuality | getCassificatorQuality (sgpp::base::DataMatrix &testDataset, const sgpp::base::DataVector &classesReference, const double threshold=0.0) | 
| compute the quality for given testDataset, classification ONLY! test is automatically called in order to determine the regression values of the current learner  More... | |
| virtual ClassificatorQuality | getCassificatorQuality (const sgpp::base::DataVector &classesComputed, const sgpp::base::DataVector &classesReference, const double threshold=0.0) | 
| compute the quality for given testDataset, classification ONLY!  More... | |
| sgpp::base::Grid & | getGrid () | 
| bool | getIsRegression () const | 
| determines the current mode  More... | |
| bool | getIsVerbose () const | 
| determines the current verbose mode of learner  More... | |
| std::vector< std::pair< size_t, double > > | getRefinementExecTimes () | 
| LearnerBase (const bool isRegression, const bool isVerbose=true) | |
| Constructor.  More... | |
| LearnerBase (const LearnerBase ©Me) | |
| Copy-Constructor.  More... | |
| void | setIsVerbose (const bool isVerbose) | 
| sets the current verbose mode of learner  More... | |
| void | setReuseCoefficients (bool reuseCoefficients) | 
| void | setSolverVerbose (bool solverVerbose) | 
| void | store (std::string tGridFilename, std::string tAlphaFilename) | 
| store the grid and its current coefficients into files for further usage.  More... | |
| virtual LearnerTiming | train (sgpp::base::DataMatrix &trainDataset, sgpp::base::DataVector &classes, const sgpp::base::RegularGridConfiguration &GridConfig, const sgpp::solver::SLESolverConfiguration &SolverConfigRefine, const sgpp::solver::SLESolverConfiguration &SolverConfigFinal, const sgpp::base::AdaptivityConfiguration &AdaptConfig, bool testAccDuringAdapt, const double lambdaRegularization, sgpp::base::DataMatrix *testDataset=nullptr, sgpp::base::DataVector *testClasses=nullptr) | 
| Learning a dataset with spatially adaptive sparse grids.  More... | |
| LearnerTiming | train (sgpp::base::DataMatrix &trainDataset, sgpp::base::DataVector &classes, const sgpp::base::RegularGridConfiguration &GridConfig, const sgpp::solver::SLESolverConfiguration &SolverConfig, const double lambdaRegularization) | 
| Learning a dataset with regular sparse grids.  More... | |
| virtual | ~LearnerBase () | 
| Destructor.  More... | |
Protected Member Functions | |
| std::unique_ptr< sgpp::datadriven::DMSystemMatrixBase > | createDMSystem (sgpp::base::DataMatrix &trainDataset, double lambda) override | 
| abstract method that constructs the corresponding system of linear equations Derived classes MUST overwrite this functions!  More... | |
| void | postProcessing (const sgpp::base::DataMatrix &trainDataset, const sgpp::solver::SLESolverType &solver, const size_t numNeededIterations) override | 
| Hook-Method for post-processing after each refinement learning.  More... | |
  Protected Member Functions inherited from sgpp::datadriven::LearnerBase | |
| virtual void | InitializeGrid (const sgpp::base::RegularGridConfiguration &GridConfig) | 
| Initialize the grid and its coefficients.  More... | |
| virtual void | preProcessing () | 
| Hook-Method for pre-processing before starting learning.  More... | |
Additional Inherited Members | |
  Protected Attributes inherited from sgpp::datadriven::LearnerBase | |
| std::unique_ptr< sgpp::base::DataVector > | alpha | 
| the grid's coefficients  More... | |
| size_t | currentRefinementStep | 
| the current refinment step during training  More... | |
| double | execTime | 
| execution time  More... | |
| std::vector< std::pair< size_t, double > > | ExecTimeOnStep | 
| double | GByte | 
| number of transferred Gbytes  More... | |
| double | GFlop | 
| number of executed Floating Point operations  More... | |
| std::unique_ptr< sgpp::base::Grid > | grid | 
| sparse grid object  More... | |
| bool | isRegression | 
| is regression selected  More... | |
| bool | isTrained | 
| is the grid trained  More... | |
| bool | isVerbose | 
| is verbose output enabled  More... | |
| bool | reuseCoefficients | 
| shall the coefficients be reused between refinement steps  More... | |
| bool | solverVerbose | 
| sets the verbose option for the solver  More... | |
| double | stepExecTime | 
| execution time for current refinement to calculate the GFlops at the current timestep only otherwise accumulated GFlops (all refinement steps) are calculated  More... | |
| double | stepGByte | 
| number of transferred Gbytes in the current refinement step  More... | |
| double | stepGFlop | 
| number of executed Floating Point operations in the current refinement step  More... | |
This class implements standard sparse grid regression with an Identity matrix as regularization operator.
Furthermore this Learner provides support for several vectorization approaches covering GPUs, CPUs and coprocessors.
      
  | 
  explicit | 
Constructor.
| isRegression | set to true if a regression task should be executed | 
| isVerbose | set to true in order to allow console output | 
      
  | 
  virtual | 
Destructor.
      
  | 
  overrideprotectedvirtual | 
abstract method that constructs the corresponding system of linear equations Derived classes MUST overwrite this functions!
| trainDataset | training dataset | 
| lambda | lambda regularization parameter | 
Implements sgpp::datadriven::LearnerBase.
References sgpp::datadriven::LearnerBase::grid, and sgpp::datadriven::SystemMatrixLeastSquaresIdentity::setImplementation().
| std::vector< std::pair< size_t, double > > sgpp::datadriven::LearnerLeastSquaresIdentity::getRefinementExecTimes | ( | ) | 
      
  | 
  overridevirtual | 
Reimplemented from sgpp::datadriven::LearnerBase.
References sgpp::op_factory::createOperationMultipleEval(), sgpp::datadriven::LearnerBase::grid, and sgpp::base::OperationMultipleEval::mult().
      
  | 
  overrideprotectedvirtual | 
Hook-Method for post-processing after each refinement learning.
can be overwritten by derived classes
| trainDataset | matrix with training data | 
| solver | solver | 
| numNeededIterations | number of required iterations | 
Reimplemented from sgpp::datadriven::LearnerBase.
References sgpp::datadriven::LearnerBase::execTime, sgpp::datadriven::LearnerBase::GByte, sgpp::datadriven::LearnerVectorizedPerformance::GByte_, sgpp::datadriven::LearnerVectorizedPerformanceCalculator::getGFlopAndGByte(), sgpp::base::DataMatrix::getNrows(), sgpp::datadriven::LearnerBase::GFlop, sgpp::datadriven::LearnerVectorizedPerformance::GFlop_, sgpp::datadriven::LearnerBase::grid, sgpp::datadriven::LearnerBase::isVerbose, and sgpp::datadriven::LearnerBase::reuseCoefficients.
      
  | 
  overridevirtual | 
executes a Regression test for a given dataset and returns the result
| testDataset | dataset that is evaluated with the current learner | 
| classesComputed | result of the evaluation of the data set | 
Reimplemented from sgpp::datadriven::LearnerBase.
References sgpp::datadriven::LearnerBase::alpha, sgpp::op_factory::createOperationMultipleEval(), sgpp::base::DataMatrix::getNrows(), sgpp::datadriven::LearnerBase::grid, and sgpp::base::OperationMultipleEval::mult().
      
  | 
  inline | 
| double sgpp::datadriven::LearnerLeastSquaresIdentity::testRegular | ( | const sgpp::base::RegularGridConfiguration & | GridConfig, | 
| sgpp::base::DataMatrix & | testDataset | ||
| ) | 
References sgpp::datadriven::LearnerBase::alpha, sgpp::op_factory::createOperationMultipleEval(), sgpp::datadriven::LearnerBase::execTime, sgpp::base::DataMatrix::getNrows(), sgpp::datadriven::LearnerBase::grid, sgpp::datadriven::LearnerBase::InitializeGrid(), sgpp::base::OperationMultipleEval::mult(), sgpp::base::DataVector::setAll(), sgpp::base::SGppStopwatch::start(), and sgpp::base::SGppStopwatch::stop().