SG++-Doxygen-Documentation
|
Class to solve the system of equations with a LL'-decomposed matrix. More...
#include <DBMatDMSChol.hpp>
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... | |
Class to solve the system of equations with a LL'-decomposed matrix.
|
default |
Default constructor.
|
protectedvirtual |
Perform Backward substitution solving the triangular system $A alpha = y$.
decompMatrix | Triangular matrix |
y | right hand side obtained by forward substitution |
alpha | the 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().
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.
decompMatrix | the LL' lower triangular cholesky factor |
downdate | the vector representing the rank one matrix (xx') |
do_cv | indicating 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().
|
protectedvirtual |
Perform forward substitution solving the triangular system $L y = b$.
decompMatrix | Triangular matrix |
b | right hand side of our initial system matrix we solve for |
y | the 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().
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.
decompMatrix | the LL' lower triangular cholesky factor |
update | the vector representing the rank one matrix (xx') |
do_cv | indicating 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().
|
protectedvirtual |
Update the decomposition if the regularization parameter changes.
This may be more expensive then recalculating the decomposition.
decompMatrix | decomposed matrix to be modified |
lambdaUpdate | the 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().
|
virtual |
Solves a system of equations.
decompMatrix | the LL' lower triangular cholesky factor |
alpha | the vector of unknowns (the result is stored there) |
b | the right hand vector of the equation system |
lambda_old | the current regularization paramter |
lambda_new | the 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().