SG++-Doxygen-Documentation
|
Squared Penalty method for constrained optimization. More...
#include <SquaredPenalty.hpp>
Static Public Attributes | |
static constexpr double | DEFAULT_CONSTRAINT_TOLERANCE = 1e-6 |
default constraint tolerance More... | |
static constexpr double | DEFAULT_PENALTY_INCREASE_FACTOR = 10.0 |
default penalty increase factor More... | |
static constexpr double | DEFAULT_PENALTY_START_VALUE = 1.0 |
default penalty start value More... | |
static constexpr double | DEFAULT_X_TOLERANCE = 1e-6 |
default point tolerance More... | |
Static Public Attributes inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer | |
static const size_t | DEFAULT_N = 1000 |
default maximal number of iterations or function evaluations More... | |
Protected Attributes | |
double | epsilon |
constraint tolerance More... | |
std::unique_ptr< ScalarFunctionGradient > | fGradient |
objective function gradient More... | |
std::unique_ptr< VectorFunctionGradient > | gGradient |
inequality constraint function gradient More... | |
std::unique_ptr< VectorFunctionGradient > | hGradient |
equality constraint function gradient More... | |
std::vector< size_t > | kHistInner |
search history (number of inner iterations) More... | |
double | mu0 |
penalty start value More... | |
double | rhoMuPlus |
penalty increase factor More... | |
double | theta |
point tolerance More... | |
base::DataMatrix | xHistInner |
search history (inner iterations) More... | |
Protected Attributes inherited from sgpp::optimization::optimizer::ConstrainedOptimizer | |
std::unique_ptr< VectorFunction > | g |
inequality constraint function More... | |
std::unique_ptr< VectorFunction > | h |
equality constraint function More... | |
Protected Attributes inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer | |
std::unique_ptr< ScalarFunction > | f |
objective function More... | |
base::DataVector | fHist |
search history vector (optimal values) More... | |
double | fOpt |
result of optimization (optimal function value) More... | |
size_t | N |
maximal number of iterations or function evaluations More... | |
base::DataVector | x0 |
starting point More... | |
base::DataMatrix | xHist |
search history matrix (optimal points) More... | |
base::DataVector | xOpt |
result of optimization (location of optimum) More... | |
Squared Penalty method for constrained optimization.
sgpp::optimization::optimizer::SquaredPenalty::SquaredPenalty | ( | const ScalarFunction & | f, |
const ScalarFunctionGradient & | fGradient, | ||
const VectorFunction & | g, | ||
const VectorFunctionGradient & | gGradient, | ||
const VectorFunction & | h, | ||
const VectorFunctionGradient & | hGradient, | ||
size_t | maxItCount = DEFAULT_N , |
||
double | xTolerance = DEFAULT_X_TOLERANCE , |
||
double | constraintTolerance = DEFAULT_CONSTRAINT_TOLERANCE , |
||
double | penaltyStartValue = DEFAULT_PENALTY_START_VALUE , |
||
double | penaltyIncreaseFactor = DEFAULT_PENALTY_INCREASE_FACTOR |
||
) |
Constructor.
f | objective function |
fGradient | objective function gradient |
g | inequality constraint |
gGradient | inequality constraint gradient |
h | equality constraint |
hGradient | equality constraint gradient |
maxItCount | maximal number of function evaluations |
xTolerance | point tolerance |
constraintTolerance | constraint tolerance |
penaltyStartValue | penalty start value |
penaltyIncreaseFactor | penalty increase factor |
References sgpp::optimization::ScalarFunctionGradient::clone(), and sgpp::optimization::VectorFunctionGradient::clone().
Referenced by clone().
sgpp::optimization::optimizer::SquaredPenalty::SquaredPenalty | ( | const SquaredPenalty & | other | ) |
|
override |
Destructor.
|
overridevirtual |
[out] | clone | pointer to cloned object |
Implements sgpp::optimization::optimizer::UnconstrainedOptimizer.
References SquaredPenalty().
double sgpp::optimization::optimizer::SquaredPenalty::getConstraintTolerance | ( | ) | const |
References epsilon.
VectorFunctionGradient & sgpp::optimization::optimizer::SquaredPenalty::getEqualityConstraintGradient | ( | ) | const |
References hGradient.
const std::vector< size_t > & sgpp::optimization::optimizer::SquaredPenalty::getHistoryOfInnerIterationNumbers | ( | ) | const |
References kHistInner.
const base::DataMatrix & sgpp::optimization::optimizer::SquaredPenalty::getHistoryOfInnerIterationPoints | ( | ) | const |
References xHistInner.
VectorFunctionGradient & sgpp::optimization::optimizer::SquaredPenalty::getInequalityConstraintGradient | ( | ) | const |
References gGradient.
ScalarFunctionGradient & sgpp::optimization::optimizer::SquaredPenalty::getObjectiveGradient | ( | ) | const |
References fGradient.
double sgpp::optimization::optimizer::SquaredPenalty::getPenaltyIncreaseFactor | ( | ) | const |
References rhoMuPlus.
double sgpp::optimization::optimizer::SquaredPenalty::getPenaltyStartValue | ( | ) | const |
References mu0.
double sgpp::optimization::optimizer::SquaredPenalty::getXTolerance | ( | ) | const |
References theta.
|
overridevirtual |
Pure virtual method for optimization of the objective function.
The result of the optimization process can be obtained by member functions, e.g., getOptimalPoint() and getOptimalValue().
Implements sgpp::optimization::optimizer::UnconstrainedOptimizer.
References sgpp::base::DataVector::append(), sgpp::base::DataMatrix::appendRow(), epsilon, sgpp::optimization::optimizer::UnconstrainedOptimizer::f, fGradient, sgpp::optimization::optimizer::UnconstrainedOptimizer::fHist, sgpp::optimization::optimizer::UnconstrainedOptimizer::fOpt, sgpp::optimization::optimizer::ConstrainedOptimizer::g, sgpp::optimization::optimizer::UnconstrainedOptimizer::getHistoryOfOptimalPoints(), sgpp::optimization::Printer::getInstance(), sgpp::base::DataMatrix::getNrows(), sgpp::optimization::optimizer::UnconstrainedOptimizer::getOptimalPoint(), gGradient, sgpp::optimization::optimizer::ConstrainedOptimizer::h, hGradient, python.statsfileInfo::i, kHistInner, sgpp::base::DataVector::l2Norm(), sgpp::base::DataVector::max(), sgpp::base::DataVector::maxNorm(), mG, mH, mu, mu0, sgpp::optimization::optimizer::UnconstrainedOptimizer::N, sgpp::optimization::optimizer::AdaptiveGradientDescent::optimize(), sgpp::optimization::Printer::printStatusBegin(), sgpp::optimization::Printer::printStatusEnd(), sgpp::optimization::Printer::printStatusUpdate(), sgpp::base::DataMatrix::resize(), rhoMuPlus, sgpp::optimization::optimizer::UnconstrainedOptimizer::setStartingPoint(), sgpp::base::DataVector::sub(), theta, sgpp::base::DataVector::toString(), sgpp::optimization::optimizer::UnconstrainedOptimizer::x0, sgpp::optimization::optimizer::UnconstrainedOptimizer::xHist, xHistInner, and sgpp::optimization::optimizer::UnconstrainedOptimizer::xOpt.
void sgpp::optimization::optimizer::SquaredPenalty::setConstraintTolerance | ( | double | constraintTolerance | ) |
constraintTolerance | constraint tolerance |
References epsilon.
void sgpp::optimization::optimizer::SquaredPenalty::setPenaltyIncreaseFactor | ( | double | penaltyIncreaseFactor | ) |
penaltyIncreaseFactor | penalty increase factor |
References rhoMuPlus.
void sgpp::optimization::optimizer::SquaredPenalty::setPenaltyStartValue | ( | double | penaltyStartValue | ) |
penaltyStartValue | penalty start value |
References mu0.
void sgpp::optimization::optimizer::SquaredPenalty::setXTolerance | ( | double | xTolerance | ) |
xTolerance | point tolerance |
References theta.
|
static |
default constraint tolerance
|
static |
default penalty increase factor
|
static |
default penalty start value
|
static |
default point tolerance
|
protected |
constraint tolerance
Referenced by getConstraintTolerance(), optimize(), and setConstraintTolerance().
|
protected |
objective function gradient
Referenced by getObjectiveGradient(), optimize(), and SquaredPenalty().
|
protected |
inequality constraint function gradient
Referenced by getInequalityConstraintGradient(), optimize(), and SquaredPenalty().
|
protected |
equality constraint function gradient
Referenced by getEqualityConstraintGradient(), optimize(), and SquaredPenalty().
|
protected |
search history (number of inner iterations)
Referenced by getHistoryOfInnerIterationNumbers(), and optimize().
|
protected |
penalty start value
Referenced by getPenaltyStartValue(), optimize(), and setPenaltyStartValue().
|
protected |
penalty increase factor
Referenced by getPenaltyIncreaseFactor(), optimize(), and setPenaltyIncreaseFactor().
|
protected |
point tolerance
Referenced by getXTolerance(), optimize(), and setXTolerance().
|
protected |
search history (inner iterations)
Referenced by getHistoryOfInnerIterationPoints(), and optimize().