SG++-Doxygen-Documentation
sgpp::datadriven::DBMatDMSChol Class Reference

Class to solve the system of equations with a LL'-decomposed matrix. More...

#include <DBMatDMSChol.hpp>

Inheritance diagram for sgpp::datadriven::DBMatDMSChol:
sgpp::datadriven::DBMatDecompMatrixSolver sgpp::solver::SGSolver sgpp::datadriven::DBMatDMSDenseIChol

Public Member Functions

void choleskyDowndate (sgpp::base::DataMatrix &decompMatrix, const sgpp::base::DataVector &downdate, bool do_cv=false) const
 Performe a rank one cholesky downdate. More...
 
void choleskyUpdate (sgpp::base::DataMatrix &decompMatrix, const sgpp::base::DataVector &update, bool do_cv=false) const
 Performe a rank one cholesky update. More...
 
 DBMatDMSChol ()=default
 Default constructor. More...
 
virtual void solve (sgpp::base::DataMatrix &decompMatrix, sgpp::base::DataVector &alpha, const sgpp::base::DataVector &b, double lambda_old, double lambda_new) const
 Solves a system of equations. More...
 
- Public Member Functions inherited from sgpp::datadriven::DBMatDecompMatrixSolver
 DBMatDecompMatrixSolver ()
 
- Public Member Functions inherited from sgpp::solver::SGSolver
double getEpsilon ()
 gets the the epsilon, that is used in the SGSolver More...
 
size_t getNumberIterations ()
 function that returns the number of needed solve steps More...
 
double getResiduum ()
 function the returns the residuum (current or final), error of the solver More...
 
void setEpsilon (double eps)
 resets the epsilon, that is used in the SGSolver More...
 
void setMaxIterations (size_t nIterations)
 resets the number of maximum iterations More...
 
 SGSolver (size_t nMaximumIterations, double epsilon)
 Std-Constructor. More...
 
virtual ~SGSolver ()
 Std-Destructor. More...
 

Protected Member Functions

virtual void choleskyBackwardSolve (const sgpp::base::DataMatrix &decompMatrix, const sgpp::base::DataVector &y, sgpp::base::DataVector &alpha) const
 Perform Backward substitution solving the triangular system $A alpha = y$. More...
 
virtual void choleskyForwardSolve (const sgpp::base::DataMatrix &decompMatrix, const sgpp::base::DataVector &b, sgpp::base::DataVector &y) const
 Perform forward substitution solving the triangular system $L y = b$. More...
 
virtual void choleskyUpdateLambda (sgpp::base::DataMatrix &decompMatrix, double lambdaUpdate) const
 Update the decomposition if the regularization parameter changes. More...
 

Additional Inherited Members

- Protected Attributes inherited from sgpp::solver::SGSolver
double myEpsilon
 epsilon needed in the, e.g. final error in the iterative solver, or a timestep More...
 
size_t nIterations
 Number of Iterations needed for the solve. More...
 
size_t nMaxIterations
 Number of maximum iterations for cg. More...
 
double residuum
 residuum More...
 

Detailed Description

Class to solve the system of equations with a LL'-decomposed matrix.

Constructor & Destructor Documentation

◆ DBMatDMSChol()

sgpp::datadriven::DBMatDMSChol::DBMatDMSChol ( )
default

Default constructor.

Member Function Documentation

◆ choleskyBackwardSolve()

void sgpp::datadriven::DBMatDMSChol::choleskyBackwardSolve ( const sgpp::base::DataMatrix decompMatrix,
const sgpp::base::DataVector y,
sgpp::base::DataVector alpha 
) const
protectedvirtual

Perform Backward substitution solving the triangular system $A alpha = y$.

Parameters
decompMatrixTriangular matrix
yright hand side obtained by forward substitution
alphathe vector of unknowns we solve for

Reimplemented in sgpp::datadriven::DBMatDMSDenseIChol.

References sgpp::base::DataMatrix::get(), sgpp::base::DataMatrix::getNcols(), python.statsfileInfo::i, and python.utils.statsfile2gnuplot::j.

Referenced by solve().

◆ choleskyDowndate()

void sgpp::datadriven::DBMatDMSChol::choleskyDowndate ( sgpp::base::DataMatrix decompMatrix,
const sgpp::base::DataVector downdate,
bool  do_cv = false 
) const

Performe a rank one cholesky downdate.

Parameters
decompMatrixthe LL' lower triangular cholesky factor
downdatethe vector representing the rank one matrix (xx')
do_cvindicating if updates are used for cross valdiation (using special structure of update vectors to save runtime)

References sgpp::base::DataMatrix::getNrows(), sgpp::base::DataVector::getPointer(), sgpp::base::DataMatrix::getPointer(), sgpp::base::DataVector::getSize(), python.statsfileInfo::i, and m.

Referenced by choleskyUpdateLambda().

◆ choleskyForwardSolve()

void sgpp::datadriven::DBMatDMSChol::choleskyForwardSolve ( const sgpp::base::DataMatrix decompMatrix,
const sgpp::base::DataVector b,
sgpp::base::DataVector y 
) const
protectedvirtual

Perform forward substitution solving the triangular system $L y = b$.

Parameters
decompMatrixTriangular matrix
bright hand side of our initial system matrix we solve for
ythe vector of unknowns we solve for

Reimplemented in sgpp::datadriven::DBMatDMSDenseIChol.

References sgpp::base::DataMatrix::get(), sgpp::base::DataMatrix::getNcols(), python.statsfileInfo::i, and python.utils.statsfile2gnuplot::j.

Referenced by solve().

◆ choleskyUpdate()

void sgpp::datadriven::DBMatDMSChol::choleskyUpdate ( sgpp::base::DataMatrix decompMatrix,
const sgpp::base::DataVector update,
bool  do_cv = false 
) const

Performe a rank one cholesky update.

Parameters
decompMatrixthe LL' lower triangular cholesky factor
updatethe vector representing the rank one matrix (xx')
do_cvindicating if updates are used for cross valdiation (using special structure of update vectors to save runtime)

References sgpp::base::DataMatrix::getNrows(), sgpp::base::DataVector::getPointer(), sgpp::base::DataMatrix::getPointer(), sgpp::base::DataVector::getSize(), python.statsfileInfo::i, python.utils.statsfile2gnuplot::j, and m.

Referenced by sgpp::datadriven::DBMatOfflineChol::choleskyModification(), and choleskyUpdateLambda().

◆ choleskyUpdateLambda()

void sgpp::datadriven::DBMatDMSChol::choleskyUpdateLambda ( sgpp::base::DataMatrix decompMatrix,
double  lambdaUpdate 
) const
protectedvirtual

Update the decomposition if the regularization parameter changes.

This may be more expensive then recalculating the decomposition.

Parameters
decompMatrixdecomposed matrix to be modified
lambdaUpdatethe value by which the regularization parameter modifies the diagonal.

Reimplemented in sgpp::datadriven::DBMatDMSDenseIChol.

References choleskyDowndate(), choleskyUpdate(), sgpp::base::DataMatrix::getNcols(), python.statsfileInfo::i, sgpp::base::DataVector::set(), and sgpp::base::DataVector::setAll().

Referenced by solve().

◆ solve()

void sgpp::datadriven::DBMatDMSChol::solve ( sgpp::base::DataMatrix decompMatrix,
sgpp::base::DataVector alpha,
const sgpp::base::DataVector b,
double  lambda_old,
double  lambda_new 
) const
virtual

Solves a system of equations.

Parameters
decompMatrixthe LL' lower triangular cholesky factor
alphathe vector of unknowns (the result is stored there)
bthe right hand vector of the equation system
lambda_oldthe current regularization paramter
lambda_newthe new regularization paramter (e.g. if cross-validation is applied)

References choleskyBackwardSolve(), choleskyForwardSolve(), choleskyUpdateLambda(), and sgpp::base::DataMatrix::getNcols().

Referenced by sgpp::datadriven::DBMatOnlineDEChol::solveSLE().


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